-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
마이페이지 레이아웃 수정 건 #219
마이페이지 레이아웃 수정 건 #219
Changes from all commits
0eedb34
8b59292
18fe1b6
b97d58d
87ad950
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -8,32 +8,49 @@ import { ProfileSection } from './ProfileSection'; | |||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
async function MypageLayout({ children }: { children: React.ReactNode }) { | ||||||||||||||||||||||||||||||||
return ( | ||||||||||||||||||||||||||||||||
<> | ||||||||||||||||||||||||||||||||
<div className={cx(containerStyle)}> | ||||||||||||||||||||||||||||||||
<GNB /> | ||||||||||||||||||||||||||||||||
<Image src="/mypage/bg-cloud.webp" alt="bg" width={2400} height={1367} className={bgStyle} draggable={false} /> | ||||||||||||||||||||||||||||||||
<main className={mainStyle}> | ||||||||||||||||||||||||||||||||
<ProfileSection /> | ||||||||||||||||||||||||||||||||
<section className={rightSectionStyle}>{children}</section> | ||||||||||||||||||||||||||||||||
</main> | ||||||||||||||||||||||||||||||||
<div className={containerStyle}> | ||||||||||||||||||||||||||||||||
<GNB /> | ||||||||||||||||||||||||||||||||
<div className={mainStyle}> | ||||||||||||||||||||||||||||||||
<ProfileSection /> | ||||||||||||||||||||||||||||||||
<div className={rightSectionStyle}>{children}</div> | ||||||||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||||||||
</> | ||||||||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||||||||
Comment on lines
+11
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 시맨틱 HTML 요소 사용을 고려해보세요. 현재 일반 다음과 같이 수정해보세요: - <div className={containerStyle}>
+ <main className={containerStyle}>
<GNB />
- <div className={mainStyle}>
+ <section className={mainStyle}>
<ProfileSection />
- <div className={rightSectionStyle}>{children}</div>
+ <section className={rightSectionStyle}>{children}</section>
- </div>
+ </section>
- </div>
+ </main> 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
export default MypageLayout; | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
const mainStyle = grid({ | ||||||||||||||||||||||||||||||||
gap: 80, | ||||||||||||||||||||||||||||||||
gridTemplateColumns: '222px 1fr', | ||||||||||||||||||||||||||||||||
position: 'relative', | ||||||||||||||||||||||||||||||||
zIndex: 1, | ||||||||||||||||||||||||||||||||
margin: '120px 200px 0', | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
'@media (max-width: 1400px)': { | ||||||||||||||||||||||||||||||||
margin: '120px 100px 0', | ||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
// TODO : 중간 태블릿 정도도 대응하면 좋을 듯 | ||||||||||||||||||||||||||||||||
_mobile: { | ||||||||||||||||||||||||||||||||
gridTemplateColumns: '1fr', | ||||||||||||||||||||||||||||||||
margin: '0 16px 0', | ||||||||||||||||||||||||||||||||
gap: 0, | ||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
const rightSectionStyle = css({ | ||||||||||||||||||||||||||||||||
height: 'calc(100vh - 240px)', | ||||||||||||||||||||||||||||||||
overflow: 'hidden', | ||||||||||||||||||||||||||||||||
width: '100%', | ||||||||||||||||||||||||||||||||
maxW: '1080px', | ||||||||||||||||||||||||||||||||
borderRadius: 16, | ||||||||||||||||||||||||||||||||
background: 'white.white_10', | ||||||||||||||||||||||||||||||||
backdropFilter: 'blur(7px)', | ||||||||||||||||||||||||||||||||
minHeight: '700px', | ||||||||||||||||||||||||||||||||
height: 'calc(100vh - 240px)', | ||||||||||||||||||||||||||||||||
maxHeight: 'min(calc(100vh - 240px), 1000px)', | ||||||||||||||||||||||||||||||||
overflow: 'hidden', | ||||||||||||||||||||||||||||||||
maxHeight: '1400px', | ||||||||||||||||||||||||||||||||
p: 40, | ||||||||||||||||||||||||||||||||
display: 'flex', | ||||||||||||||||||||||||||||||||
flexDirection: 'column', | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
Comment on lines
+43
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 하드코딩된 maxHeight 값을 제거해야 합니다. PR의 목적이 하드코딩된 값을 제거하는 것이었으나, 다음과 같이 수정하는 것을 제안드립니다: - maxHeight: '1400px',
+ maxHeight: 'calc(100vh - 120px)', 또한
이 차이가 의도된 것인지 확인해주시기 바랍니다.
|
||||||||||||||||||||||||||||||||
_mobile: { | ||||||||||||||||||||||||||||||||
background: 'none', | ||||||||||||||||||||||||||||||||
p: 0, | ||||||||||||||||||||||||||||||||
|
@@ -61,23 +78,3 @@ const bgStyle = css({ | |||||||||||||||||||||||||||||||
marginTop: '86px', | ||||||||||||||||||||||||||||||||
pointerEvents: 'none', | ||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
const mainStyle = grid({ | ||||||||||||||||||||||||||||||||
gap: 80, | ||||||||||||||||||||||||||||||||
gridTemplateColumns: '222px 1fr', | ||||||||||||||||||||||||||||||||
position: 'relative', | ||||||||||||||||||||||||||||||||
zIndex: 1, | ||||||||||||||||||||||||||||||||
margin: '120px 200px 0', | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
'@media (max-width: 1400px)': { | ||||||||||||||||||||||||||||||||
margin: '120px 100px 0', | ||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
// TODO : 중간 태블릿 정도도 대응하면 좋을 듯 | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
_mobile: { | ||||||||||||||||||||||||||||||||
gridTemplateColumns: '1fr', | ||||||||||||||||||||||||||||||||
margin: '0 16px 0', | ||||||||||||||||||||||||||||||||
gap: 0, | ||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
스타일 최적화를 제안드립니다.
flexGrowSectionStyle
의 구현이 레이아웃 문제를 잘 해결했습니다. 성능 최적화를 위해 다음과 같은 변경을 고려해보세요:const flexGrowSectionStyle = css({ flex: '1', minHeight: '0', overflow: 'auto', display: 'flex', flexWrap: 'wrap', + willChange: 'flex-basis', });
이 변경은 flex 애니메이션 성능을 향상시킬 수 있습니다.