Skip to content

Conversation

@najitwo
Copy link
Owner

@najitwo najitwo commented Nov 18, 2024

๐Ÿ“Œ Related Issue

close #15

๐Ÿ“ Description

  • ๋งˆ์ดํŽ˜์ด์ง€ ์™„์„ฑ ๐ŸŽ‰
  • ๋ชจ๋‹ฌ๊ธฐ๋Šฅ ์ถ”๊ฐ€(๊ณต์šฉ์„ ์—ผ๋‘์— ๋‘๊ณ  ๋งŒ๋“ค์–ด ๋ดค๋Š”๋ฐ ๋ณด์‹œ๊ณ  ์˜๊ฒฌ์ฃผ์„ธ์š”...๐Ÿ˜Š)

๐Ÿ“ธ Screenshot

localhost_3000_mypage

๋ชจ๋‹ฌ
localhost_3000_mypage (2)

๐Ÿ“ข Notes

๋ง์”€ํ•˜์‹ ๋Œ€๋กœ (with-header-sidebar)์— mypage ํด๋” ์˜ฎ๊ฒผ์Šต๋‹ˆ๋‹ค.
ํด๋” ์ด์‚ฌ๋ฅผํ•ด์„œ ํŒŒ์ผ์ฒด์ธ์ง€๊ฐ€ ๋งŽ์Šต๋‹ˆ๋‹ค....

@najitwo najitwo added โœจFeature Request for a new feature or functionality ๐ŸŽจHTML&CSS Issues or tasks specifically related to HTML structure or CSS styling labels Nov 18, 2024
@najitwo najitwo requested review from a user, devmanta and naseungyeop November 18, 2024 09:59
@najitwo najitwo self-assigned this Nov 18, 2024
@najitwo najitwo linked an issue Nov 18, 2024 that may be closed by this pull request
3 tasks
Copy link
Collaborator

@devmanta devmanta left a comment

Choose a reason for hiding this comment

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

์•„๋‹ˆ.. ์†๊ฐ€๋ฝ ํ˜น์‹€ 20๊ฐœ์‹ ๊ฐ€์š”?
์—„์ฒญ ๋น ๋ฅด๊ฒŒ ๋จผ๊ฐ€๋ฅผ ๋งŽ์ด ๋งŒ๋“œ์…จ๋„ค์š”.. ๋Œ€๋‹จ์“ฐ... ๐Ÿ‘
๋ชจ๋‹ฌ ์ €๋‘ ์“ธ์ˆ˜์žˆ๊ฒŒ ๋งŒ๋“ค์–ด์ฃผ์„ธ์š”....๐Ÿฅน
๊ทผ๋ฐ ์ € ๋‹‰๋„ค์ž„ ํ•œ๊ธ€๋กœ ๋˜๋˜๊ฐ€์š”....!?

Comment on lines +36 to +39
await axios.put('/auth/password', {
password: data.currentPassword,
newPassword: data.newPassword,
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

๋ชฌ๊ฐ€.. ์ €๋Š” apiํ˜ธ์ถœํ•˜๋Š” ๋ถ€๋ถ„์€ ๋ณ„๋„๋กœ ๋นผ์„œ ์ปดํฌ๋„ŒํŠธ์—์„œ๋Š” ํ•จ์ˆ˜ ํ˜ธ์ถœ๋งŒํ•ด์„œ ์“ฐ๋Š” ๋ฐฉํ–ฅ์œผ๋กœ ํ•˜๊ณ ์žˆ๋Š”๋ฐ
์–ด๋– ์‹ ๊ฐ€์š”~?

Copy link
Owner Author

Choose a reason for hiding this comment

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

@devmanta ์œ ์ € ์ˆ˜์ • ํฌ์ŠคํŠธ ์š”์ฒญ์‹œ ํ•œ๊ธ€ ๋‹‰๋„ค์ž„ ์ž˜๋˜๋˜๋ฐ์š”???
๋ณ„๋„๋กœ ๋นผ๋ฉด ์ข‹์ฃ !!! ๊ท€์ฐฎ์•„์„œ ์•ˆํ–ˆ์Šต๋‹ˆ๋‹ค.. ๐Ÿค

Copy link
Collaborator

Choose a reason for hiding this comment

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

@najitwo ๊ทธ๋Ÿฐ์ด์œ ๋ผ๋ฉด ๋นผ.์ฃผ.์„ธ.์š”. ๐Ÿ˜‡

Copy link
Collaborator

Choose a reason for hiding this comment

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

๋“ฑ๋ก๋งŒ ๊ทธ๋Ÿผ ํ•œ๊ธ€์ด์•ˆ๋˜๋Š”๊ฑด๊ฐ€. . . . . .

});
reset();
} catch (error) {
if (error instanceof Error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Error ์ธ์Šคํ„ด์Šค๊ฐ€ ์•„๋‹๊ฒฝ์šฐ๋„ ์žˆ๋‚˜์š”..!?

Copy link
Owner Author

Choose a reason for hiding this comment

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

catch์˜ error ํƒ€์ž…์ด unkown์ด๋ผ ํƒ€์ž… ์ขํžˆ๊ธฐ๋กœ ์‚ฌ์šฉํ•œ ๊ฒƒ ์ž…๋‹ˆ๋‹ค.!!

Comment on lines +43 to +56
if (error.message === ERROR_MESSAGES.CURRENT_PASSWORD_INCORRECT) {
openModal(<AlertModal>{error.message}</AlertModal>);
setError('currentPassword', {
type: 'manual',
message: error.message,
});
}
if (error.message === ERROR_MESSAGES.SAME_AS_OLD_PASSWORD) {
openModal(<AlertModal>{error.message}</AlertModal>);
setError('newPassword', {
type: 'manual',
message: error.message,
});
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

๋ชฌ๊ฐ€..if๋ฌธ์•ˆ์— if๋ฌธ์€ ์ง€์–‘ํ•˜๋Š” ๋А๋‚Œ์ด์—ฌ์„œ
switch ๋ฌธ์„ ์“ฐ๋ฉด ๋” ๋ณด๊ธฐ ํŽธํ• ๊ฒƒ๊ฐ™์•„์š”!
์•„๋‹ˆ๋ฉด ์š”๋Ÿฐ๋А๋‚Œ๋„ ์ข‹์„๊ฒƒ๊ฐ™์•„์š”~!

Suggested change
if (error.message === ERROR_MESSAGES.CURRENT_PASSWORD_INCORRECT) {
openModal(<AlertModal>{error.message}</AlertModal>);
setError('currentPassword', {
type: 'manual',
message: error.message,
});
}
if (error.message === ERROR_MESSAGES.SAME_AS_OLD_PASSWORD) {
openModal(<AlertModal>{error.message}</AlertModal>);
setError('newPassword', {
type: 'manual',
message: error.message,
});
}
const errorHandlingMap = {
[ERROR_MESSAGES.CURRENT_PASSWORD_INCORRECT]: 'currentPassword',
[ERROR_MESSAGES.SAME_AS_OLD_PASSWORD]: 'newPassword',
};
const field = errorHandlingMap[error.message];
if (field) {
openModal(<AlertModal>{error.message}</AlertModal>);
setError(field, {
type: 'manual',
message: error.message,
});
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

์š” ํŒŒ์ผ์ด ๋ชจ๋‹ฌ์ธ๊ฑฐ์ฃ ..!?
๊ณต์šฉ์„ ์—ผ๋‘์— ๋‘๊ณ  ๋งŒ๋“œ์…จ๋‹ค๊ณ  ํ•œ๊ฑฐ์—ฌ์„œ ์ถ”๊ฐ€ ์˜๊ฒฌ ๋“œ๋ฆฝ๋‹ˆ๋‹ค..!
๋ชจ๋‹ฌ ๋ณด๋ฉด์€ ์œ„์— ํƒ€์ดํ‹€์ด๋ž‘ x๋ฒ„ํŠผ ์žˆ๊ฑฐ๋‚˜ ์—†๊ฑฐ๋‚˜ ์ด๊ฒƒ๋„ ๊ณ ๋ คํ•ด์ฃผ์‹œ๋ฉด ์ข‹์„๊ฒƒ๊ฐ™์•„์š”
ํ™•์ธ ๋ฒ„ํŠผ๋ถ€๋ถ„๋„ ์žˆ์„์ˆ˜๋„ ์žˆ๊ณ , ์—†์„์ˆ˜๋„ ์žˆ๋Š”๊ฑฐ์—ฌ์„œ ๋‚ด์šฉ+ํ•˜๋‹จ๋ฒ„ํŠผ ๊นŒ์ง€๋ฅผ children์œผ๋กœ ๋ฐ›๊ณ ,
๋ชจ๋‹ฌ์œ„์— ํƒ€์ดํ‹€์ด๋ž‘ x ๋ฒ„ํŠผ ์ด๊ฑฐ๋ฅผ ๋ชจ๋‹ฌ์—์„œ ์ปจํŠธ๋กคํ•˜๋ฉด ์ข‹์„๊ฒƒ๊ฐ™์Šต๋‹ˆ๋‹ค.

๋’ค์— ๊ฒ€์€ ๋ฐฐ๊ฒฝ์— ์Šคํฌ๋กค ๋ง‰๋Š”๊ฑด ๋˜์–ด์žˆ์„๊นŒ์š”?
๊ทธ๋ฆฌ๊ณ  ๊ฒ€์€๋ฐฐ๊ฒฝ ํด๋ฆญํ•˜๋ฉด์€ ๋ชจ๋‹ฌ์ด ๋‹ซํžˆ๋Š”๊ฒƒ๋‘์š”! (์ด๊ฑด ๋‹ซํž๊ฑด์ง€ ์•ˆ๋‹ซํž๊ฑด์ง€๋Š” ๋ชจ๋‹ฌ props๋กœ ์ปจํŠธ๋กคํ•˜๋ฉด ๋” ์‚ฌ์šฉ์„ฑ ๋†’์„๊ฒƒ๊ฐ™์•„์š”)
๋ชจ๋‹ฌ ๋„์šธ๋•Œ ์•ฝ๊ฐ„ ์Šค๋ฅด๋ฅต ์• ๋‹ˆ๋งค์ด์…˜ ์ถ”๊ฐ€ํ•˜๋ฉด ๋” ์žˆ์–ด๋ณด์ผ๊ฒƒ๊ฐ™์Šต๋‹ˆ๋‹ค~

๋” ๋งŒ์•ฝ์— ์—ฌ์œ ๊ฐ€ ๋œ๋‹ค๋ฉด
๋ชจ๋‹ฌ ๋‚ด์—์„œ๋Š” ํƒญ ๋ˆ„๋ฅด๋ฉด ๋ชจ๋‹ฌ ๋‚ด์šฉ์—์„œ๋งŒ ํฌ์ปค์Šค ๋Œ๊ฒŒ๋” ํ•˜๋Š”๊ฒƒ๋„ ์žˆ๋”๋ผ๊ณ ์š” focusTrap ์ด๋ผ๊ณ  ํ•˜๋˜๋ฐ ์ด๊ฒƒ๋„ ๊ณ ๋ คํ•ด๋ณด๋ฉด ์ข‹์„๊ฒƒ๊ฐ™์•„์š”
๊ทธ๋ฆฌ๊ณ  ๋ชจ๋‹ฌ ๋„์šฐ๋ฉด focus๊ฐ€๋Šฅํ•œ ์นœ๊ตฌ์ค‘์— ์ฒซ๋ฒˆ์งธ ์š”์†Œ์— ํฌ์ปค์Šค ๊ฐ€๊ฒŒํ•˜๋ฉด ๋ชจ๋ฐ”์ผ ํ™”๋ฉด์—์„œ ๋ชฌ๊ฐ€ ๊ทธ๋‚˜๋งˆ ์งค๋ฆฌ๋Š”ํ˜„์ƒ? ์ด๋Ÿฐ๊ฒŒ ๋œํ•œ๊ฒƒ ๊ฐ™๋”๋ผ๊ตฌ์š”

์ œ๊ฐ€ ์ €๋ฒˆ ํ”„๋กœ์ ํŠธ ๋•Œ ๋ชจ๋‹ฌ์— ์ง‘์ฐฉ(?)ํ•ด์„œ ์ œ๊ฐ€ ๊ตฌํ˜„ํ–ˆ๋˜ ๋‚ด์šฉ์œ„์ฃผ๋กœ ๋ง์”€๋“œ๋ ค๋ด…๋‹ˆ๋‹ค...ใ…Žใ…Žใ…Ž
ํ˜น์‹œ ๋ง์”€๋“œ๋ฆฐ๊ฑฐ์ค‘์— ์ด๋ฏธ ๊ตฌํ˜„๋˜์–ด์žˆ๋Š”๋ฐ ์ œ๊ฐ€ ๋ชป ์•Œ์•„?๋ณธ๊ฒƒ๋„ ์žˆ์„๊ฒƒ๊ฐ™์•„์š”

์ž˜๋งŒ๋“ค์–ด์ฃผ์‹œ๋ฉด... ์ €๋Š” najitwo-modal ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์“ฐ๊ณ ์‹ถ๋„ค์š”...๐Ÿค—๐Ÿค—

Copy link
Owner Author

@najitwo najitwo Nov 18, 2024

Choose a reason for hiding this comment

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

ํ—ค๋”, ๋ฉ”์ธ, ํ‘ธํ„ฐ ์˜์—ญ ์ด๋Ÿฐ๊ฑด ์ง„์งœ ๋ชจ๋‹ฌ ๋งˆ๋‹ค ๋‹ค๋‹ฌ๋ผ์„œ
๊ป๋ฐ๊ธฐ๋งŒ ๋งŒ๋“ค๊ณ  ํ—ค๋”, ๋ฉ”์ธ, ํ‘ธํ„ฐ๋ฅผ ์•„์˜ˆ ์ปค์Šคํ…€(children)์œผ๋กœ ๋‹ค ๋ฐ›๋Š”๊ฑด ์–ด๋–ป๊ฒŒ ์ƒ๊ฐํ•˜์‹œ๋‚˜์š”?

์Šคํฌ๋กค ๋ง‰๋Š”๊ฒƒ,์• ๋‹ˆ๋ฉ”์ด์…˜,ํฌ์ปค์Šค ์ธ์ง€ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.!
๊ฒ€์€๋ฐฐ๊ฒฝ ํด๋ฆญํ•˜๋ฉด์€ ๋ชจ๋‹ฌ์ด ๋‹ซํžŒ๋‹ค << ์ด๊ฒƒ๋„ ๊ณ ๋ คํ•ด๋ดค๋Š”๋ฐ ๋Œ€์‹œ๋ณด๋“œ ์ถ”๊ฐ€ํ•˜๋‹ค๊ฐ€ ์ž˜๋ชปํด๋ฆญํ•˜๋ฉด ํ—ˆ๋งํ• ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค..๐Ÿ™„

Copy link
Collaborator

@devmanta devmanta Nov 18, 2024

Choose a reason for hiding this comment

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

๊ทธ๋Ÿผ ๋‹ซ์„์ง€๋ง์ง€๋„ ํ”„๋กญ์Šค๋กœ ๋ฐ›์•„์„œ ์ฒ˜๋ฆฌํ•˜๋Š”๊ฑด์š”!?

ํ—ค๋”,๋ฉ”์ธ,ํ‘ธํ„ฐ ๋‹ค ์ž์‹์œผ๋กœ ๋ฐ›์•„๋„๋ ๊ฒƒ..๊ฐ™์€๋ฐ
ํ—ค๋”์ •๋„๋Š” ๋ชจ๋‹ฌ์—์„œ ํ•˜๋Š”๊ฑด์–ด๋•Œ์š” !?
(ํ—ค๋”๋Š” ์žˆ๊ฑฐ๋‚˜ ์—†๊ฑฐ๋‚˜ ๋ง๊ณ  ์Šคํƒ€์ผ์ƒ ๋‹ค๋ฅธ์ƒํ™ฉ์€ ํฌ๊ฒŒ? ์—†์„๊ฒƒ๊ฐ™์•„์š”)

๊ทผ๋ฐ ๊ทธ๊ฑฐ ๋’ค์— ๋”ค์ฒ˜๋ฆฌ๋œ๊ฑฐ ํด๋ฆญํ•˜๊ณ  ๋‹ซ์•„๋„
๋ชจ๋‹ฌ ๋‹ซํž๋•Œ ๋”ฐ๋กœ input์นœ๊ตฌ๋“ค ์ดˆ๊ธฐํ™” ์•ˆํ•ด์ฃผ๋ฉด ๊ฐ’์€ ๋‚จ์•„์ž‡๋”๋ผ๊ณ ์š” ใ…‹ใ…‹ใ…‹ใ…‹ ์ด๊ฑด ์—ฌ๋‹ด.. ์ €๋ฒˆํ”„๋กœ์ ํŠธ๋•Œ ๊ทธ๋ž˜์„œ ๋ฆฌ์…‹ ๋กœ์ง ์ถ”๊ฐ€ํ–‡์–ด์š”..


return createPortal(
<div className={styles.overlay}>
{modals.map((content, index) => (
Copy link
Collaborator

Choose a reason for hiding this comment

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

์ด๊ฑด ์—ฌ๋Ÿฌ๊ฐœ์˜ ๋ชจ๋‹ฌ์„ ๋„์šฐ๋Š”..๊ฑด๊ฐ€์š”!?

๊ทผ๋ฐ ์ดํŒŒ์ผ์ด๋ž‘.. AlertModal์ด๋ž‘.. ๋ชจ๋‹ฌ์ด ๋‘๊ฐ ๊ฑด๊ฐ€์š”...? ๋ชจ์ง€..ใ…‹ใ…‹ใ…‹
์ž˜ ์ดํ•ด๊ฐ€ ์•ˆ๊ฐ”์Šต๋‹ˆ๋‹ค....

Copy link
Owner Author

Choose a reason for hiding this comment

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

๊ป๋ฐ๊ธฐ๋ผ๊ณ  ๋ณด๋ฉด ๋ฉ๋‹ˆ๋‹ค..
overlay๋กœ ๋ฐฐ๊ฒฝ ๊ฒ€๊ฒŒ ํ•ด์ฃผ๊ณ 
๊ทธ๋ƒฅ ์ง„์งœ ๋ชจ๋‹ฌ ์š”์†Œ ๊ฐ€์šด๋ฐ์— ์žก์•„์ฃผ๊ธฐ๋งŒํ•˜๋Š”???

Copy link
Owner Author

Choose a reason for hiding this comment

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

Alert๋ชจ๋‹ฌ์€ ๊ทธ๋ƒฅ ๋น„๋ฐ€๋ฒˆํ˜ธ ์˜ค๋ฅ˜ ์šฉ์œผ๋กœ ๋งŒ๋“ ๊ฑฐ๊ณ 
์ด modal์„ ๋งŒ์•ฝ์— ์‚ฌ์šฉํ•œ๋‹ค๊ณ ํ•˜๋ฉด
EditModal, AddModal ์ด๋ ‡๊ฒŒ ๋งŒ๋“ค์–ด ์งˆ๊ฑฐ๊ฐ™์Šต๋‹ˆ๋‹ค.

Copy link
Collaborator

Choose a reason for hiding this comment

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

๊ป๋ฐ๊ธฐ....?๐Ÿค”
Modal ์ปดํฌ๋„ŒํŠธ ํ•˜๋‚˜๋กœ ํ‰์น˜๊ธฐ์—” ๋ฌด๋ฆฌ๊ฐ€ ์žˆ๋‚˜์š”?

Copy link
Owner Author

Choose a reason for hiding this comment

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

๋ญ”๊ฐ€๋ญ”๊ฐ€ ์„ค๋ช…์ด ์ž˜์•ˆ๋˜๊ณ ์žˆ๋Š”๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค.๐Ÿ˜ฅ
๋‚ด์ผ ํŒ€๋ฏธํŒ…๋•Œ ์–˜๊ธฐํ•ด๋ณด์‹œ์ฃ ...

Copy link
Collaborator

Choose a reason for hiding this comment

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

์ด์นœ๊ตฌ ํŒŒ์ผ๋ช… ๋Œ€๋ฌธ์ž ์‹œ์ž‘์•ˆํ•œ๊ฑฐ๋Š” ์˜๋„๋œ๊ฑด๊ฐ€์š”!?

Copy link
Owner Author

Choose a reason for hiding this comment

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

์‹ค์ˆ˜์ž…๋‹ˆ๋‹ค... ๐Ÿ˜ฑ

@najitwo najitwo merged commit 2f8670a into develop Nov 18, 2024
najitwo added a commit that referenced this pull request Nov 18, 2024
* โœจ feat: add mypage layout and responsive CSS

Implemented Modal component

* ๐Ÿ› fix: correct typo

* ๐Ÿ› fix: correct filename casing

* ๐Ÿ’ก comment: temporarily comment out
najitwo added a commit that referenced this pull request Nov 23, 2024
* โœจ feat: add mypage layout and responsive CSS

Implemented Modal component

* ๐Ÿ› fix: correct typo

* ๐Ÿ› fix: correct filename casing

* ๐Ÿ’ก comment: temporarily comment out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

โœจFeature Request for a new feature or functionality ๐ŸŽจHTML&CSS Issues or tasks specifically related to HTML structure or CSS styling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] add mypage layout and finalize styling

3 participants