-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
refactor. #63-마이페이지 재렌더링 방지 위해 중첩 레이아웃 적용
- Loading branch information
Showing
8 changed files
with
142 additions
and
103 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,29 +1,26 @@ | ||
import React from "react"; | ||
import MypageLayout from "@/components/Mypage/MypageLayout"; | ||
import React, { ReactElement } from "react"; | ||
import MypageLayout from "@/components/Layout/MypageLayout"; | ||
import MyProjectComponents from "@/components/Mypage/MyProjects/MyProjects"; | ||
import { useAuthStore } from "@/stores/authStore"; | ||
import { css, Global } from "@emotion/react"; | ||
import { NextPageWithLayout } from "../_app"; | ||
import Layout from "@/components/Layout/Layout"; | ||
|
||
const MyProjects: React.FC = () => { | ||
const MyProjects: NextPageWithLayout = () => { | ||
const { isLoggedIn } = useAuthStore(); | ||
if (isLoggedIn) { | ||
return ( | ||
<div> | ||
<Global | ||
styles={css` | ||
&::-webkit-scrollbar { | ||
display: none; | ||
} | ||
`} | ||
/> | ||
<MypageLayout> | ||
<MyProjectComponents /> | ||
</MypageLayout> | ||
</div> | ||
); | ||
return <MyProjectComponents />; | ||
} else { | ||
return null; | ||
} | ||
}; | ||
|
||
MyProjects.getLayout = function getLayout(page: ReactElement) { | ||
return ( | ||
<Layout> | ||
<MypageLayout>{page}</MypageLayout> | ||
</Layout> | ||
); | ||
}; | ||
|
||
export default MyProjects; |
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