-
Notifications
You must be signed in to change notification settings - Fork 2
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
6 changed files
with
95 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@import '@/styles/globals.scss'; | ||
|
||
.container { | ||
background-color: $white; | ||
padding: 0 20px; | ||
@include Drag; | ||
} | ||
|
||
.section { | ||
width: 100%; | ||
height: 64px; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
align-self: stretch; | ||
border-bottom: 1px solid $gray10; | ||
@include B14M; | ||
} | ||
|
||
.subtext { | ||
@include C12M; | ||
color: $gray50; | ||
} | ||
|
||
.cursor { | ||
cursor: pointer; | ||
} |
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,5 @@ | ||
import styles from './MyReview.module.scss'; | ||
|
||
export default function MyReview() { | ||
return <div className={styles.container}></div>; | ||
} |
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
File renamed without changes.
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,46 @@ | ||
import Subheader from '@/components/Layout/Subheader'; | ||
import MyReview from '@/components/Setting/MyReview'; | ||
import { authState } from '@/states/authState'; | ||
import { useRouter } from 'next/router'; | ||
import { useEffect } from 'react'; | ||
import { useRecoilValue } from 'recoil'; | ||
import { InitialPageMeta } from '@/components/MetaData'; | ||
import { SSRMetaProps } from '@/components/MetaData/MetaData.type'; | ||
import { serviceUrl } from '@/constants/serviceUrl'; | ||
import { GetServerSideProps } from 'next'; | ||
|
||
export const getServerSideProps: GetServerSideProps = async () => { | ||
const OGTitle = '작성 후기 | HELLOFIT'; | ||
const OGUrl = `${serviceUrl}/setting/my-review`; | ||
return { | ||
props: { | ||
OGTitle, | ||
OGUrl, | ||
}, | ||
}; | ||
}; | ||
|
||
export default function MyReviewPage({ OGTitle, OGUrl }: SSRMetaProps) { | ||
const auth = useRecoilValue(authState); | ||
const router = useRouter(); | ||
|
||
useEffect(() => { | ||
// 로그인이 되어 있지 않으면 /map으로 이동 | ||
if (!auth.isLoggedIn) { | ||
router.push('/map'); | ||
} | ||
}, [auth.isLoggedIn, router]); | ||
|
||
// 로그인 상태 확인 중에는 렌더링을 멈춤 | ||
if (!auth.isLoggedIn) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<> | ||
<InitialPageMeta title={OGTitle} url={OGUrl} /> | ||
<Subheader subheaderText="작성 후기" isGray={false} /> | ||
<MyReview /> | ||
</> | ||
); | ||
} |