-
Notifications
You must be signed in to change notification settings - Fork 4
Feat/component/gnb/DEVING-15 #13
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
Feat/component/gnb/DEVING-15 #13
Conversation
โฆm/MoimService/Moim-FE into feat/component/GNB/DEVING-15
โฆice/Moim-FE into feat/component/GNB/DEVING-15
|
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
|
|
Important Review skippedAuto reviews are limited to specific labels. ๐ท๏ธ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Walkthrough์ด๋ฒ PR์ ์นํฉ ์ค์ ๋ฐ ๊ด๋ จ ํ์ผ ์ ๋ฐ์ ๊ฑธ์ณ SVG ํ์ผ ์ฒ๋ฆฌ๋ฅผ ์ํ ๊ตฌ์ฑ์ด ์ถ๊ฐ๋๊ณ , ๋ ์ด์์ ๋ฐ ๋ด๋น๊ฒ์ด์ ๊ด๋ จ ์ปดํฌ๋ํธ๊ฐ ์ ๋ฐ์ดํธ๋์์ต๋๋ค. ๊ตฌ์ฒด์ ์ผ๋ก๋ ์นํฉ ์ค์ ์ SVG ๋ก๋ ์ถ๊ฐ, ์ข ์์ฑ ์์ , ๋ ์ด์์ ํ์ผ ๋ด Header ์ปดํฌ๋ํธ ํฌํจ ๋ฐ ์ธ์ด, ํฐํธ ์ค์ ๋ณ๊ฒฝ, ์ํ ๋ณ์ ์์ , Tailwind ๋ฐ TypeScript ๊ตฌ์ฑ ํ์ฅ์ด ์ด๋ฃจ์ด์ก์ต๋๋ค. Changes
Sequence Diagram(s)sequenceDiagram
participant U as ์ฌ์ฉ์
participant H as Header ์ปดํฌ๋ํธ
participant N as ๋ด๋น๊ฒ์ด์
(BeforeLogin/AfterLogin)
U->>H: ํ์ด์ง ์์ฒญ
H->>H: ๋ก๊ทธ์ธ ์ํ ํ์ธ
alt ๋ก๊ทธ์ธ ์ํ์ธ ๊ฒฝ์ฐ
H->>N: AfterLogin ์ปดํฌ๋ํธ ๋ ๋๋ง
Note right of H: ๋ชจ๋ฐ์ผ ๋ฉ๋ด ํ ๊ธ ๊ธฐ๋ฅ ํฌํจ
else ๋ก๊ทธ์ธ ์ํ๊ฐ ์๋ ๊ฒฝ์ฐ
H->>N: BeforeLogin ์ปดํฌ๋ํธ ๋ ๋๋ง
end
U->>H: ๋ฉ๋ด ํ ๊ธ ํด๋ฆญ
H->>H: ๋ชจ๋ฐ์ผ ๋ฉ๋ด ํ์/์จ๊น ์ฒ๋ฆฌ
Possibly related PRs
Suggested labels
Suggested reviewers
๐ชง TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests โ |
CI Status Report๊ฒ์ฌ ๊ฒฐ๊ณผ
โ ์ผ๋ถ ๊ฒ์ฌ๊ฐ ์คํจํ์ต๋๋ค. |
CI Status Report๊ฒ์ฌ ๊ฒฐ๊ณผ
โ ๋ชจ๋ ๊ฒ์ฌ๊ฐ ํต๊ณผ๋์์ต๋๋ค. |
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.
Actionable comments posted: 6
๐งน Nitpick comments (7)
next.config.mjs (1)
3-9: SVG ๋ก๋ ์ค์ ์ ์ต์ ํํ๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.ํ์ฌ ์ค์ ๋ ์ ์๋ํ์ง๋ง, ๋ค์๊ณผ ๊ฐ์ ์ถ๊ฐ ์ต์ ์ ๊ณ ๋ คํด๋ณด์๋ ๊ฒ์ ์ด๋จ๊น์?
webpack(config) { config.module.rules.push({ test: /\.svg$/, - use: ['@svgr/webpack'], + use: [{ + loader: '@svgr/webpack', + options: { + svgoConfig: { + plugins: [ + { + name: 'removeViewBox', + active: false + } + ] + } + } + }], }); return config; },์ด๋ ๊ฒ ์ค์ ํ๋ฉด SVG ์ต์ ํ ๊ณผ์ ์์ viewBox๊ฐ ์ ๊ฑฐ๋๋ ๊ฒ์ ๋ฐฉ์งํ์ฌ SVG์ ํฌ๊ธฐ ์กฐ์ ์ด ๋ ์ ์ฐํด์ง๋๋ค.
tsconfig.json (1)
34-40: TypeScript ํ์ผ ํฌํจ ๊ฒฝ๋ก๊ฐ ๊ฐ์ ๋์์ต๋๋ค.
src๋๋ ํ ๋ฆฌ๋ฅผ ํฌํจ์ํจ ๊ฒ์ ์ข์ ๋ณ๊ฒฝ์ด์ง๋ง, ๋ ๊ตฌ์ฒด์ ์ธ ํจํด์ ์ถ๊ฐํ๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค."include": [ "src", + "src/**/*.json", "next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts" ],JSON ํ์ผ๋ ๋ช ์์ ์ผ๋ก ํฌํจ์ํค๋ฉด ํ์ ์์ ์ฑ์ด ๋์ฑ ํฅ์๋ ๊ฒ ๊ฐ์ต๋๋ค.
package.json (1)
17-18: ์์กด์ฑ ๋ฒ์ ๊ด๋ฆฌ ๋ฐฉ์์ ๊ฐ์ ํ๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.ํ์ฌ
^๋ฅผ ์ฌ์ฉํ ๋ฒ์ ๋ฒ์๊ฐ ๋๋ฌด ๊ด๋ฒ์ํ ์ ์์ต๋๋ค. ํนํ ์ฃผ์ UI ์ปดํฌ๋ํธ์ ๋น๋ ๋๊ตฌ์ ๊ฒฝ์ฐ ๋ ์๊ฒฉํ ๋ฒ์ ๊ด๋ฆฌ๊ฐ ํ์ํ ์ ์์ต๋๋ค.- "@radix-ui/react-slot": "^1.1.2", - "@svgr/webpack": "^8.1.0", + "@radix-ui/react-slot": "~1.1.2", + "@svgr/webpack": "~8.1.0",
~๋ฅผ ์ฌ์ฉํ๋ฉด ํจ์น ๋ฒ์ ๋ง ์ ๋ฐ์ดํธ๋์ด ์๊ธฐ์น ์์ ๋ณ๊ฒฝ์ฌํญ์ผ๋ก ์ธํ ๋ฌธ์ ๋ฅผ ์ค์ผ ์ ์์ต๋๋ค.src/app/layout.tsx (1)
12-17: ํฐํธ ๋ก๋ฉ ์ต์ ํ ์ ์Pretendard ํฐํธ ์ค์ ์ด ์ ๋์ด์์ผ๋, ์ฑ๋ฅ ์ต์ ํ๋ฅผ ์ํ preload ์ ๋ต์ด ํ์ํ ์ ์์ต๋๋ค.
๋ค์๊ณผ ๊ฐ์ด preload ์ต์ ์ ์ถ๊ฐํ๋ ๊ฒ์ ๊ณ ๋ คํด๋ณด์ธ์:
const pretendard = localFont({ src: '../fonts/PretendardVariable.woff2', weight: '100 900', variable: '--font-pretendard', display: 'swap', + preload: true, });tailwind.config.ts (1)
17-76: ์์ ์์คํ ์ฒด๊ณํ ํ์ํ์ฌ ์์ ์์คํ ์ด ์ผ๊ด์ฑ์ด ๋ถ์กฑํฉ๋๋ค. ํนํ:
- ์์ ์ด๋ฆ์ด ํผํฉ๋์ด ์์ (Cgray, BG, default ๋ฑ)
- ์ผ๋ถ ์์์ ํ๊ธ ์ฃผ์์ด ์์
- HSL๊ณผ HEX ๊ฐ์ด ํผ์ฉ๋จ
์์ ์์คํ ์ ๋ค์๊ณผ ๊ฐ์ด ์ฒด๊ณํํ๋ ๊ฒ์ ์ ์ํฉ๋๋ค:
- ๋ชจ๋ ์์ ์ด๋ฆ์ ์ผ๊ด๋ ๋ค์ด๋ฐ ์ปจ๋ฒค์ ์ผ๋ก ํต์ผ
- ๋ชจ๋ ์์ ๊ฐ์ ๋์ผํ ํ์(HSL ๋๋ HEX)์ผ๋ก ํต์ผ
- ์์ ๊ณ์ธต ๊ตฌ์กฐ ์ ๋ฆฝ (primary, secondary, neutral ๋ฑ)
src/components/common/Header.tsx (2)
156-164: ๋ชจ๋ฐ์ผ ๋ฉ๋ด์ ๋ฐฑ๋๋กญ/์ค๋ฒ๋ ์ด ์ถ๊ฐ๋ฅผ ์ ์ํฉ๋๋ค.์ฌ์ฉ์ ๊ฒฝํ ํฅ์์ ์ํด ๋ชจ๋ฐ์ผ ๋ฉ๋ด๊ฐ ์ด๋ ธ์ ๋ ๋ฐฑ๋๋กญ์ ์ถ๊ฐํ๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.
๋ค์๊ณผ ๊ฐ์ ๊ตฌํ์ ์ ์ํฉ๋๋ค:
+ {/* backdrop */} + {isOpen && ( + <div + className="fixed inset-0 bg-black/50 lg:hidden" + onClick={() => setIsOpen(false)} + /> + )} {/* mobile */} <div className={`fixed right-0 h-screen w-screen transform overflow-x-hidden bg-BG px-[24px] transition-transform duration-300 ease-in-out ${
135-167: ์ฝ๋ ๊ตฌ์กฐ ๊ฐ์ ์ ์ํ ์ ์ํ์ฌ ๋ชจ๋ ์ปดํฌ๋ํธ๊ฐ ํ๋์ ํ์ผ์ ์์ด ๊ฐ๋ ์ฑ์ด ๋จ์ด์ง๋๋ค. ๋ํ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ํ์ ์ ์๊ฐ ๋๋ฝ๋์ด ์์ต๋๋ค.
๋ค์๊ณผ ๊ฐ์ ๊ตฌ์กฐ ๊ฐ์ ์ ์ ์ํฉ๋๋ค:
- ์ปดํฌ๋ํธ ๋ถ๋ฆฌ:
// src/components/common/Header/index.tsx export { default } from './Header'; // src/components/common/Header/Header.tsx // ๋ฉ์ธ Header ์ปดํฌ๋ํธ // src/components/common/Header/components/index.ts export * from './BeforeLogin'; export * from './AfterLogin'; export * from './NavLinks';
- ํ์ ์ ์ ์ถ๊ฐ:
// src/components/common/Header/types.ts export interface HeaderProps { isLogIn: boolean; } export interface NavLinksProps { isMobile?: boolean; } export interface MenuItem { label: string; href?: string; onClick?: () => void; }
๐ Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
โ Files ignored due to path filters (4)
package-lock.jsonis excluded by!**/package-lock.jsonsrc/assets/icon/logo.svgis excluded by!**/*.svgsrc/assets/icon/profile.svgis excluded by!**/*.svgsrc/fonts/PretendardVariable.woff2is excluded by!**/*.woff2
๐ Files selected for processing (9)
next.config.mjs(1 hunks)package.json(1 hunks)src/app/layout.tsx(2 hunks)src/app/preview/dropdown/page.tsx(1 hunks)src/app/preview/gnb/page.tsx(1 hunks)src/components/common/Header.tsx(1 hunks)src/types/global.d.ts(1 hunks)tailwind.config.ts(3 hunks)tsconfig.json(1 hunks)
๐ Additional comments (4)
src/types/global.d.ts (1)
1-5: SVG ๋ชจ๋ ์ ์ธ์ด ์ฌ๋ฐ๋ฅด๊ฒ ๊ตฌํ๋์์ต๋๋ค!SVG ํ์ผ์ React ์ปดํฌ๋ํธ๋ก ์ฌ์ฉํ ์ ์๋๋ก ํ์ ์ด ์ ์ ์๋์ด ์์ต๋๋ค.
src/app/preview/gnb/page.tsx (1)
7-8: ๋ง์ง ๊ฐ์ ์ ์ ์ฑ ๊ฒํ ํ์ํ๋์ฝ๋ฉ๋
mt-40ํด๋์ค๊ฐ ๋ชจ๋ ํ๋ฉด ํฌ๊ธฐ์์ ์ ์ ํ์ง ํ์ธ์ด ํ์ํฉ๋๋ค. ๋ฐ์ํ ๋์์ธ์ ๊ณ ๋ คํ์ฌ ํ๋ฉด ํฌ๊ธฐ์ ๋ฐ๋ฅธ ๋์ ์ธ ๋ง์ง ๊ฐ ์ ์ฉ์ ๊ณ ๋ คํด๋ณด์ธ์.src/app/layout.tsx (1)
27-27: Header ์ปดํฌ๋ํธ ํ์ด๋๋ ์ด์ ์ ๋ต ๊ฒํํด๋ผ์ด์ธํธ ์ฌ์ด๋ ์ธํฐ๋์ ์ด ์๋ Header ์ปดํฌ๋ํธ๊ฐ ์๋ฒ ์ปดํฌ๋ํธ์ธ Layout์ ์ง์ ํฌํจ๋์ด ์์ต๋๋ค. ํ์ด๋๋ ์ด์ ์ ๋ต์ ๊ณ ๋ คํด์ผ ํ ์ ์์ต๋๋ค.
src/components/common/Header.tsx (1)
1-10: ์์กด์ฑ ๋ฐ ์ํฌํธ ๊ตฌ์ฑ์ด ์ ์ ํฉ๋๋ค!ํด๋ผ์ด์ธํธ ์ฌ์ด๋ ๋ ๋๋ง์ ์ํ 'use client' ์ง์๋ฌธ๊ณผ ํ์ํ ์ปดํฌ๋ํธ๋ค์ด ์ฌ๋ฐ๋ฅด๊ฒ ์ํฌํธ๋์ด ์์ต๋๋ค.
| export default function Home() { | ||
| return ( | ||
| <div className="mt-40"> | ||
| <Header isLogIn /> |
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
๋ก๊ทธ์ธ ์ํ ๊ด๋ฆฌ ๊ฐ์ ํ์
isLogIn prop์ด ํ๋์ฝ๋ฉ๋์ด ์์ต๋๋ค. ์ค์ ์ฌ์ฉ์์ ๋ก๊ทธ์ธ ์ํ๋ฅผ ๋ฐ์ํ๋๋ก ์์ ์ด ํ์ํฉ๋๋ค.
๋ค์๊ณผ ๊ฐ์ด ์ค์ ๋ก๊ทธ์ธ ์ํ๋ฅผ ์ฌ์ฉํ๋๋ก ์์ ์ ์ ์ํฉ๋๋ค:
- <Header isLogIn />
+ <Header isLogIn={useAuth().isAuthenticated} />๐ Committable suggestion
โผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <Header isLogIn /> | |
| <Header isLogIn={useAuth().isAuthenticated} /> |
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.
์ถํ ๋ก๊ทธ์ธ ๋ก์ง ๊ตฌ์ฑ ์ ๋ณ๊ฒฝ ์์
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.
@dbswl701 ๋ค, ์ดํดํ์ต๋๋ค. ๋ก๊ทธ์ธ ๋ก์ง์ด ๊ตฌํ๋๋ฉด ๊ทธ๋ ํจ๊ป ์์ ํ์๋ฉด ๋๊ฒ ์ต๋๋ค.
โ๏ธ Learnings added
Learnt from: dbswl701
PR: MoimService/Moim-FE#13
File: src/app/preview/gnb/page.tsx:8-8
Timestamp: 2025-02-18T07:37:44.358Z
Learning: The hardcoded `isLogIn` prop in the GNB preview page (`src/app/preview/gnb/page.tsx`) is temporary and will be replaced with actual authentication state when login functionality is implemented.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
|
|
||
| export default function Home() { | ||
| const [selectedFilter, setSelectedFilter] = useState<string | null>(null); | ||
| const [selectedFilter] = useState<string | null>(null); |
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.
์ํ ๊ด๋ฆฌ ๋ก์ง ์ค๋ฅ
selectedFilter์ setter ํจ์๊ฐ ์ ๊ฑฐ๋์ด ์ํ๋ฅผ ๋ณ๊ฒฝํ ์ ์์ต๋๋ค. ์ด๋ก ์ธํด ํํฐ ๊ธฐ๋ฅ์ด ์๋ํ์ง ์์ ์ ์์ต๋๋ค.
๋ค์๊ณผ ๊ฐ์ด ์์ ํ์ฌ ์ํ ๋ณ๊ฒฝ ๊ธฐ๋ฅ์ ๋ณต์ํ์ธ์:
- const [selectedFilter] = useState<string | null>(null);
+ const [selectedFilter, setSelectedFilter] = useState<string | null>(null);๐ Committable suggestion
โผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const [selectedFilter] = useState<string | null>(null); | |
| const [selectedFilter, setSelectedFilter] = useState<string | null>(null); |
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.
ํ์ํ์ง ์์ ๋ถ๋ถ์ด๋ผ ์๋ตํจ.
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.
@dbswl701 ๋ค, ์ดํดํ์ต๋๋ค. ์ํ๊ฐ ํ์ ๋ชฉ์ ์ผ๋ก๋ง ์ฌ์ฉ๋๋ ๊ฒ์ ํ์ธํ์ต๋๋ค.
โ๏ธ Learnings added
Learnt from: dbswl701
PR: MoimService/Moim-FE#13
File: src/app/preview/dropdown/page.tsx:7-7
Timestamp: 2025-02-18T07:28:11.028Z
Learning: In React components, when a state variable is only used for display purposes and doesn't need to be modified, the setter function can be omitted from the useState destructuring.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
| screens: { | ||
| md: '376px', | ||
| lg: '745px', | ||
| }, |
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
๋ฐ์ํ ๋ธ๋ ์ดํฌํฌ์ธํธ ์ฌ๊ฒํ ํ์
ํ์ฌ ์ค์ ๋ ๋ธ๋ ์ดํฌํฌ์ธํธ ๊ฐ๋ค์ด ์ผ๋ฐ์ ์ธ ๋ชจ๋ฐ์ผ ๊ธฐ๊ธฐ ํฌ๊ธฐ์ ๋ง์ง ์์ ์ ์์ต๋๋ค:
- md: 376px (์ผ๋ฐ์ ์ธ ๋ชจ๋ฐ์ผ ๊ธฐ๊ธฐ ๋๋น์ธ 375px๋ณด๋ค 1px ํผ)
- lg: 745px (์ผ๋ฐ์ ์ธ ํ๋ธ๋ฆฟ ๋ธ๋ ์ดํฌํฌ์ธํธ์ธ 768px์ ์ฐจ์ด๊ฐ ์์)
ํ์ค ๋ธ๋ ์ดํฌํฌ์ธํธ ๊ฐ์ผ๋ก ์์ ์ ์ ์ํฉ๋๋ค:
screens: {
- md: '376px',
- lg: '745px',
+ md: '375px',
+ lg: '768px',
},๐ Committable suggestion
โผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| screens: { | |
| md: '376px', | |
| lg: '745px', | |
| }, | |
| screens: { | |
| md: '375px', | |
| lg: '768px', | |
| }, |
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.
375px ์ธ ๊ฒฝ์ฐ ๋ชจ๋ฐ์ผ๋ทฐ๊ฐ ๋ณด์ฌ์ ธ์ผ ํ์ง๋ง, md: 375px์ ํ๋ฉด md์ด์์ธ ๊ฒฝ์ฐ์ ์ ์ฉ์ด ๋๊ธฐ์ ์ฌ๊ธฐ์ 1px์ ์ถ๊ฐํ์์ต๋๋ค.
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.
@dbswl701 ์, ์ดํดํ์ต๋๋ค. 375px์์ ๋ชจ๋ฐ์ผ ๋ทฐ๋ฅผ ์ ํํ๊ฒ ์ ์งํ๊ธฐ ์ํ ์๋์ ์ธ ์ค์ ์ด์๊ตฐ์. ์ด๋ ๋งค์ฐ ์ธ์ฌํ ์ ๊ทผ ๋ฐฉ์์ ๋๋ค. ์ด์ ์ ์์ ์ฒ ํํ๊ฒ ์ต๋๋ค.
โ๏ธ Learnings added
Learnt from: dbswl701
PR: MoimService/Moim-FE#13
File: tailwind.config.ts:13-16
Timestamp: 2025-02-18T07:31:07.887Z
Learning: In responsive design breakpoints, when mobile view needs to be maintained at exactly 375px, setting the md breakpoint to 376px (instead of 375px) is preferred. This ensures mobile styles are applied at 375px, while md styles only take effect from 376px onwards.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
| <Logo /> | ||
| </Link> | ||
| <NavLinks /> | ||
| {isLogIn ? <BeforeLogin /> : <AfterLogin />} |
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.
๋ก๊ทธ์ธ ์ํ์ ๋ฐ๋ฅธ ์กฐ๊ฑด๋ถ ๋ ๋๋ง ๋ก์ง์ด ๋ฐ๋๋ก ๋์ด ์์ต๋๋ค.
isLogIn์ด true์ผ ๋ BeforeLogin ์ปดํฌ๋ํธ๋ฅผ ๋ ๋๋งํ๊ณ ์์ต๋๋ค.
๋ค์๊ณผ ๊ฐ์ด ์์ ํ๋ ๊ฒ์ ์ ์ํฉ๋๋ค:
- {isLogIn ? <BeforeLogin /> : <AfterLogin />}
+ {isLogIn ? <AfterLogin /> : <BeforeLogin />}๐ Committable suggestion
โผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| {isLogIn ? <BeforeLogin /> : <AfterLogin />} | |
| {isLogIn ? <AfterLogin /> : <BeforeLogin />} |
| const MobileAfterLogin = () => { | ||
| return ( | ||
| <div className="flex flex-col py-[24px]"> | ||
| <div className="flex items-center justify-between"> | ||
| <Link | ||
| className="typo-head3 p-[16px] text-Cgray500 hover:text-Cgray700" | ||
| href="/login" | ||
| > | ||
| ๋ก๊ทธ์์ | ||
| </Link> | ||
| <div className="flex"> | ||
| <Profile /> | ||
| <span className="typo-head3 m-auto w-[77px] text-center text-white"> | ||
| ๊น๋ฐค์ | ||
| </span> | ||
| </div> | ||
| </div> | ||
| <Link | ||
| className="typo-head4 p-[16px] text-Cgray400 hover:text-Cgray500" | ||
| href="/signup" | ||
| > | ||
| ๋ง์ดํ์ด์ง | ||
| </Link> | ||
| <Link | ||
| className="typo-head4 p-[16px] text-Cgray400 hover:text-Cgray500" | ||
| href="/signup" | ||
| > | ||
| ๋์ ๋ชจ์ | ||
| </Link> | ||
| </div> | ||
| ); | ||
| }; |
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.
MobileAfterLogin ์ปดํฌ๋ํธ์ ๋งํฌ ๊ฒฝ๋ก๋ฅผ ์์ ํด์ผ ํฉ๋๋ค.
์๋ชป๋ ๊ฒฝ๋ก๊ฐ ์ฌ์ฉ๋๊ณ ์์ต๋๋ค:
- ๋ก๊ทธ์์ ๋งํฌ๊ฐ
/login์ ๊ฐ๋ฆฌํด - ๋ง์ดํ์ด์ง์ ๋์ ๋ชจ์ ๋งํฌ๊ฐ
/signup์ ๊ฐ๋ฆฌํด
๋ค์๊ณผ ๊ฐ์ด ์์ ํ๋ ๊ฒ์ ์ ์ํฉ๋๋ค:
- href="/login"
+ onClick={handleLogout}
...
- href="/signup"
+ href="/my-page"
...
- href="/signup"
+ href="/my-meetings"๐ Committable suggestion
โผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const MobileAfterLogin = () => { | |
| return ( | |
| <div className="flex flex-col py-[24px]"> | |
| <div className="flex items-center justify-between"> | |
| <Link | |
| className="typo-head3 p-[16px] text-Cgray500 hover:text-Cgray700" | |
| href="/login" | |
| > | |
| ๋ก๊ทธ์์ | |
| </Link> | |
| <div className="flex"> | |
| <Profile /> | |
| <span className="typo-head3 m-auto w-[77px] text-center text-white"> | |
| ๊น๋ฐค์ | |
| </span> | |
| </div> | |
| </div> | |
| <Link | |
| className="typo-head4 p-[16px] text-Cgray400 hover:text-Cgray500" | |
| href="/signup" | |
| > | |
| ๋ง์ดํ์ด์ง | |
| </Link> | |
| <Link | |
| className="typo-head4 p-[16px] text-Cgray400 hover:text-Cgray500" | |
| href="/signup" | |
| > | |
| ๋์ ๋ชจ์ | |
| </Link> | |
| </div> | |
| ); | |
| }; | |
| const MobileAfterLogin = () => { | |
| return ( | |
| <div className="flex flex-col py-[24px]"> | |
| <div className="flex items-center justify-between"> | |
| <Link | |
| className="typo-head3 p-[16px] text-Cgray500 hover:text-Cgray700" | |
| onClick={handleLogout} | |
| > | |
| ๋ก๊ทธ์์ | |
| </Link> | |
| <div className="flex"> | |
| <Profile /> | |
| <span className="typo-head3 m-auto w-[77px] text-center text-white"> | |
| ๊น๋ฐค์ | |
| </span> | |
| </div> | |
| </div> | |
| <Link | |
| className="typo-head4 p-[16px] text-Cgray400 hover:text-Cgray500" | |
| href="/my-page" | |
| > | |
| ๋ง์ดํ์ด์ง | |
| </Link> | |
| <Link | |
| className="typo-head4 p-[16px] text-Cgray400 hover:text-Cgray500" | |
| href="/my-meetings" | |
| > | |
| ๋์ ๋ชจ์ | |
| </Link> | |
| </div> | |
| ); | |
| }; |
| const AfterLogin = () => { | ||
| const menu = [ | ||
| { label: '๋ด ๋ชจ์' }, | ||
| { label: '๋ง์ดํ์ด์ง' }, | ||
| { label: '๋ก๊ทธ์์' }, | ||
| ]; | ||
| return ( | ||
| <nav className="ml-auto hidden lg:flex"> | ||
| <div className="flex items-center"> | ||
| <Dropdown items={menu} trigger={<Profile />} /> | ||
| <span className="typo-head3 m-auto w-[77px] text-center text-white"> | ||
| ๊น๋ฐค์ | ||
| </span> | ||
| </div> | ||
| </nav> | ||
| ); | ||
| }; |
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.
AfterLogin ์ปดํฌ๋ํธ์ ๋ฉ๋ด ํญ๋ชฉ์ ๋ํ ๋์์ ๊ตฌํํด์ผ ํฉ๋๋ค.
๋ฉ๋ด ํญ๋ชฉ๋ค์ ๋ํ ๋งํฌ๋ ํด๋ฆญ ํธ๋ค๋ฌ๊ฐ ๊ตฌํ๋์ด ์์ง ์์ต๋๋ค. ๋ํ ์ฌ์ฉ์ ์ด๋ฆ์ด ํ๋์ฝ๋ฉ๋์ด ์์ต๋๋ค.
๋ค์๊ณผ ๊ฐ์ด ์์ ํ๋ ๊ฒ์ ์ ์ํฉ๋๋ค:
const menu = [
- { label: '๋ด ๋ชจ์' },
- { label: '๋ง์ดํ์ด์ง' },
- { label: '๋ก๊ทธ์์' },
+ { label: '๋ด ๋ชจ์', href: '/my-meetings' },
+ { label: '๋ง์ดํ์ด์ง', href: '/my-page' },
+ { label: '๋ก๊ทธ์์', onClick: handleLogout },
];
return (
<nav className="ml-auto hidden lg:flex">
<div className="flex items-center">
<Dropdown items={menu} trigger={<Profile />} />
<span className="typo-head3 m-auto w-[77px] text-center text-white">
- ๊น๋ฐค์
+ {user?.name}
</span>
</div>
</nav>
);๐ Committable suggestion
โผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const AfterLogin = () => { | |
| const menu = [ | |
| { label: '๋ด ๋ชจ์' }, | |
| { label: '๋ง์ดํ์ด์ง' }, | |
| { label: '๋ก๊ทธ์์' }, | |
| ]; | |
| return ( | |
| <nav className="ml-auto hidden lg:flex"> | |
| <div className="flex items-center"> | |
| <Dropdown items={menu} trigger={<Profile />} /> | |
| <span className="typo-head3 m-auto w-[77px] text-center text-white"> | |
| ๊น๋ฐค์ | |
| </span> | |
| </div> | |
| </nav> | |
| ); | |
| }; | |
| const AfterLogin = () => { | |
| const menu = [ | |
| { label: '๋ด ๋ชจ์', href: '/my-meetings' }, | |
| { label: '๋ง์ดํ์ด์ง', href: '/my-page' }, | |
| { label: '๋ก๊ทธ์์', onClick: handleLogout }, | |
| ]; | |
| return ( | |
| <nav className="ml-auto hidden lg:flex"> | |
| <div className="flex items-center"> | |
| <Dropdown items={menu} trigger={<Profile />} /> | |
| <span className="typo-head3 m-auto w-[77px] text-center text-white"> | |
| {user?.name} | |
| </span> | |
| </div> | |
| </nav> | |
| ); | |
| }; |
CI Status Report๊ฒ์ฌ ๊ฒฐ๊ณผ
โ ๋ชจ๋ ๊ฒ์ฌ๊ฐ ํต๊ณผ๋์์ต๋๋ค. |
CI Status Report๊ฒ์ฌ ๊ฒฐ๊ณผ
โ ๋ชจ๋ ๊ฒ์ฌ๊ฐ ํต๊ณผ๋์์ต๋๋ค. |
๐ย ์ฃผ์ ์์ ๋ด์ฉ
๐บย ์คํฌ๋ฆฐ์ท
๋ก๊ทธ์ธ ์ ๋ฐ์คํฌํ
๋ก๊ทธ์ธ ํ ๋ฐ์คํฌํ
๋ชจ๋ฐ์ผ ๋ทฐ(๋ก๊ทธ์ธ ์ , ํ ๋์ผ)
๋ก๊ทธ์ธ ์ ๋ชจ๋ฐ์ผ
๋ก๊ทธ์ธ ํ ๋ชจ๋ฐ์ผ
๐ ์ฐธ๊ณ ์ฌํญ
๐ฌย ๋ฆฌ๋ทฐ ์๊ตฌ์ฌํญ
๐ย ๊ด๋ จ ์ด์
ex) DEVING-15
Summary by CodeRabbit
์ ๊ธฐ๋ฅ
์คํ์ผ