-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
1,062 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,6 @@ dist-ssr | |
*.sln | ||
*.sw? | ||
|
||
.env | ||
|
||
*storybook.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import axios from 'axios'; | ||
import endpoints from '@constants/endpoints'; | ||
import { TokenReIssueResponse } from '@/types/auth'; | ||
|
||
export async function reIssueAccessToken() { | ||
const response = await axios.get<TokenReIssueResponse>(endpoints.reIssue); | ||
return response.data.AccessToken; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import endpoints from '@constants/endpoints'; | ||
import { MyInfoResponse } from '@/types/member'; | ||
import axiosInstance from '@/utils/network'; | ||
|
||
export async function getMyInfo(): Promise<MyInfoResponse> { | ||
const response = await axiosInstance.get<MyInfoResponse>(endpoints.myInfo); | ||
return response.data; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import Header from '@components/header'; | ||
import Footer from '@components/footer'; | ||
import { ReactNode } from 'react'; | ||
import Container from '@components/container'; | ||
import { useTheme } from '@emotion/react'; | ||
|
||
interface PageProps { | ||
hideHeader?: boolean; | ||
hideFooter?: boolean; | ||
children?: ReactNode; | ||
} | ||
function Page({ hideHeader, hideFooter, children }: PageProps) { | ||
const theme = useTheme(); | ||
return ( | ||
<div css={{ backgroundColor: theme.colors.background.darken }}> | ||
{ !hideHeader && ( | ||
<Header /> | ||
)} | ||
<Container direction="column" justify="flex-start"> | ||
{children} | ||
</Container> | ||
{ !hideFooter && ( | ||
<Footer /> | ||
)} | ||
</div> | ||
); | ||
} | ||
|
||
export default Page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const prefix = '/api'; | ||
|
||
const endpoints = { | ||
myInfo: `${prefix}/users`, | ||
reIssue: `${prefix}/reissue`, | ||
}; | ||
|
||
const authRequiredEndpoints = { | ||
[endpoints.myInfo]: true, | ||
}; | ||
|
||
export function isAuthRequired(endpoint?: string) { | ||
return endpoint && endpoint in authRequiredEndpoints; | ||
} | ||
|
||
export default endpoints; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.