Skip to content
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

Use info logic/#82 #86

Merged
merged 14 commits into from
Apr 27, 2024
Merged

Use info logic/#82 #86

merged 14 commits into from
Apr 27, 2024

Conversation

seonghunYang
Copy link
Collaborator

@seonghunYang seonghunYang commented Apr 25, 2024

๐Ÿ“Œ ์ž‘์—… ๋‚ด์šฉ

๊ตฌํ˜„ ๋‚ด์šฉ ๋ฐ ์ž‘์—… ํ–ˆ๋˜ ๋‚ด์—ญ

  • ๋กœ๊ทธ์•„์›ƒ ๋ฐ ํšŒ์›ํƒˆํ‡ด ๋กœ์ง, ๊ทธ๋ฆฌ๊ณ  ์ปดํฌ๋„ŒํŠธ ๊ตฌํ˜„
  • mock์—์„œ ์ธ์ฆ ๊ด€๋ จ ๋กœ์ง ์ˆ˜์ •
  • ๋ฏธ๋“ค์›จ์–ด ๋ผ์šฐํŒ… ๋กœ์ง ์ˆ˜์ •

๐Ÿค” ๊ณ ๋ฏผ ํ–ˆ๋˜ ๋ถ€๋ถ„

  • ์ธ์ฆ ๋กœ์ง์œผ๋กœ ํ…Œ์ŠคํŠธ๊ฐ€ ์–ด๋ ค์›Œ์ง€๋Š” ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด, ๊ฐœ๋ฐœ ๋ชจ๋“œ์ผ ๋•Œ๋งŒ ์ธ์ฆ ์ฒ˜๋ฆฌ๋ฅผ ํ•˜๋Š” devModeAuthGuard() ํ•จ์ˆ˜๋ฅผ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๋˜ ๋‹ค๋ฅธ ํ•ด๊ฒฐ์ฑ…์€ next/header์˜ ์ฟ ํ‚ค๋ฅผ ๋ชจ์˜ํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ด์— ๋Œ€ํ•ด user-info-navigator ์ปดํฌ๋„ŒํŠธ์—์„œ ์ž‘์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์–ด๋Š ์ •๋„๊นŒ์ง€ mock์„ ์œ ์ง€ํ•˜๊ณ  ๊ด€๋ฆฌํ•ด์•ผ ํ•˜๋Š”์ง€์— ๋Œ€ํ•œ ๊ณ ๋ฏผ์€ ํ•ญ์ƒ ์žˆ๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๊ฐœ๋ฐœ์˜ ํŽธ์˜์„ฑ์„ ์œ„ํ•ด AuthGuard()๋ฅผ ์ œ๊ฑฐํ•  ์ˆ˜๋„ ์žˆ์ง€๋งŒ, ๋‚˜์ค‘์— ๋™์ž‘์„ ์ •ํ™•ํ•˜๊ฒŒ ๋ชจ์˜ํ•ด์•ผ ํ•  ํ•„์š”๊ฐ€ ์žˆ์„ ๋•Œ ์‚ฌ์šฉํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

๐Ÿ”Š ๋„์›€์ด ํ•„์š”ํ•œ ๋ถ€๋ถ„

  • user.command ํŒŒ์ผ์ด ๋„ˆ๋ฌด ํฌ๋„ค์š”. ๋กœ์ง๋ณ„๋กœ ํŒŒ์ผ์„ ๋ถ„๋ฆฌํ•˜๋Š” ๊ฒƒ์„ ๊ณ ๋ คํ•˜๊ณ  ์žˆ๋Š”๋ฐ. ์—ฌ๋Ÿฌ๋ถ„์˜ ์˜๊ฒฌ์„ ๋“ฃ๊ณ  ์‹ถ์–ด์š”.

Copy link

@seonghunYang seonghunYang reopened this Apr 26, 2024
Copy link

Copy link
Member

@gahyuun gahyuun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค!

Comment on lines +18 to +23
export async function signOut() {
cookies().delete('accessToken');
cookies().delete('refreshToken');

redirect('/sign-in');
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

async ํ‚ค์›Œ๋“œ๊ฐ€ ์กด์žฌํ•˜๋Š”๋ฐ ํ˜น์‹œ ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š”?

@@ -2,6 +2,7 @@ export const DIALOG_KEY = {
RESULT_CATEGORY: 'RESULT_CATEGORY',
DIALOG_TEST: 'DIALOG_TEST',
LECTURE_SEARCH: 'LECTURE_SEARCH',
USER_DEELETE: 'USER_DEELETE',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
USER_DEELETE: 'USER_DEELETE',
USER_DELETE: 'USER_DELETE',

Comment on lines +38 to +39
const allowdPath = strict ? allowdOnlyGuestPath : allowdGuestPath;
return allowdPath.some((allowedPath) => path.startsWith(allowedPath));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const allowdPath = strict ? allowdOnlyGuestPath : allowdGuestPath;
return allowdPath.some((allowedPath) => path.startsWith(allowedPath));
const allowedPath = strict ? allowedOnlyGuestPath : allowedGuestPath;
return allowedPath.some((allowedPath) => path.startsWith(allowedPath));

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด ์ปดํฌ๋„ŒํŠธ๋ฅผ ๊ตฌํ˜„ํ•˜์‹  ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š”?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user ํŒŒ์ผ์ด ํ™•์‹คํžˆ ๊ธธ์–ด์ง€๊ธด ํ–ˆ๋„ค์š” user๋ž‘ auth ํŒŒ์ผ์„ ๋ถ„๋ฆฌํ•˜์‹œ๋Š” ๊ฑด ์–ด๋–ค๊ฐ€์š”?

Comment on lines +9 to +13
const handleModalToggle = () => {
toggle();
};

return <Button onClick={handleModalToggle} size="sm" variant="text" label="ํšŒ์›ํƒˆํ‡ดํ•˜๊ธฐ" />;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onClick = {toggle} ๋กœ ์ ์„ ์ˆ˜๋„ ์žˆ๋Š”๋ฐ ๋”ฐ๋กœ handleModalToggle ํ•จ์ˆ˜๋ฅผ ๋งŒ๋“œ์‹  ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š”?

@seonghunYang seonghunYang merged commit 364e312 into main Apr 27, 2024
3 of 4 checks passed
@seonghunYang seonghunYang deleted the use-info-logic/#82 branch April 27, 2024 08:57
@seonghunYang seonghunYang restored the use-info-logic/#82 branch April 27, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants