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

Refactor/bottom sheet #173

Merged
merged 13 commits into from
Aug 24, 2022
Merged

Refactor/bottom sheet #173

merged 13 commits into from
Aug 24, 2022

Conversation

9yujin
Copy link
Member

@9yujin 9yujin commented Aug 24, 2022

๐Ÿ“ PR Summary

commonSheet ๋ฐ”ํ…€์‹œํŠธ๋ฅผ ์ „์—ญ์œผ๋กœ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

๐ŸŒฒ Working Branch

refactor/bottomSheet

๐ŸŒฒ TODOs

  • ์ œ์•ˆํ•˜๊ธฐ, ๊ฑฐ์ ˆํ•˜๊ธฐ api ํ…Œ์ŠคํŠธ ํ•„์š”

Related Issues

#167

Copy link
Member

@sungwoo-shin sungwoo-shin left a comment

Choose a reason for hiding this comment

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

๋ฐ”ํ…€์‹œํŠธ ๋ฆฌํŒฉ ๋„˜ ๊ณ ์ƒํ–ˆ์–ด~ ๋ฐ”ํ…€์‹œํŠธ ์‚ฌ์šฉํ•˜๋Š” UI ์ปดํฌ๋„ŒํŠธ์—์„œ ๋ฐ”ํ…€์‹œํŠธ ๊ด€๋ จ ๋กœ์ง์ด ํ•จ์ˆ˜๋กœ ๋”ฐ๋กœ ๋ถ„๋ฆฌ๋˜๋‹ˆ๊นŒ ์ข‹์€๊ฒƒ ๊ฐ™๊ณ , ํ•จ์ˆ˜ ์ฝ”๋“œ๊ฐ€ ๋Š˜์–ด๋‚˜๊ธด ํ–ˆ์ง€๋งŒ ์—ญํ• ๋ณ„๋กœ ๋ถ„๋ฆฌ๋˜๊ณ  JSX๊ฐ€ ๋งŽ์ด ์ค„์–ด์„œ ๋‚˜๋Š” ์ง€๊ธˆ ํ˜•ํƒœ ์ข‹์€๊ฒƒ ๊ฐ™์•„!

Comment on lines 74 to 80
{/* {sheetType === 'contract' && (
<SheetButton
onClickNext={sheetProps!.onClickNext!}
disabledNext={sheetProps!.disabledNext!}
label={sheetProps!.label!}
/>
)} */}
Copy link
Member

Choose a reason for hiding this comment

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

ํ•„์š”์—†๋Š” ์ฃผ์„์€ ์‚ญ์ œ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค~

}
};

return <>{renderComponent()}</>;
Copy link
Member

Choose a reason for hiding this comment

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

์ด๋Ÿฐ๊ฒฝ์šฐ ํ•จ์ˆ˜๋กœ ์•„์˜ˆ ๋ถ„๋ฆฌํ•˜๋Š”๊ฒƒ ๋ณด๋‹ค if else ๋ฌธ ์‚ฌ์šฉํ•˜๋Š”๊ฒŒ ์ฝ”๋“œ๋ฅผ ์œ„์—์„œ๋ถ€ํ„ฐ ์•„๋ž˜๋กœ ๊ณ„์†ํ•ด์„œ ์ฝ์–ด๋‚ด๋ ค๊ฐˆ ์ˆ˜ ์žˆ์–ด์„œ ๊ฐ€๋…์„ฑ์ด ๋” ์ข‹์€๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ตฌ์กฐ๋ฅผ ์ถ”์ฒœ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

let content: React.ReactElement = <></>;
if (state) {
  content =  ...
}

return (
  <>{content}</>
);

};

function GlobalBottomSheet() {
const state = useAppSelector(selectBottomSheetState);
Copy link
Member

Choose a reason for hiding this comment

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

state, ํ˜น์€ boomSheetState์˜ ๊ฒฝ์šฐ ์–ด๋–ค ๊ฐ’๋“ค์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๋Š” ๋ณ€์ˆ˜์ธ์ง€ ๊ฐ์ด ์•ˆ์žกํž™๋‹ˆ๋‹ค. ์ข€๋” ๊ตฌ์ฒด์ ์ธ ๋ณ€์ˆ˜๋ช… ์‚ฌ์šฉํ•˜์‹œ๋ฉด ์ข‹์„๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Copy link
Member Author

Choose a reason for hiding this comment

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

state ๊ฐ’์„ ๊ตฌ์กฐ๋ถ„ํ•ดํ• ๋‹น์œผ๋กœ ๋ฐ”๋กœ ๋ฐ›์ง€ ์•Š๊ณ  ์•„๋ž˜์ค„์—์„œ ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๊ฑฐ๋กœ ๋ณด์‹œ๋ฉด ๋ฌด์Šจ ๊ฐ’๋“ค์ด ์žˆ๋Š”์ง€ ์ธ์ง€๋ ๊ฑฐ๋ผ ์ƒ๊ฐํ•ด์„œ ๋‹จ์ˆœํžˆ state๋กœ ์ง€์—ˆ๋Š”๋ฐ, bottomSheetState๋กœ ์ผ๋‹จ ๋„ค์ด๋ฐ ๋ณ€๊ฒฝํ–ˆ์œผ์š”

openSheetBySequence(openSheet);
};

// 4-a. '๋ˆ๊ธธ์ด ํฌ๊ธฐ๋˜์—ˆ์–ด์š”' ๋ฐ”ํ…€์‹œํŠธ ํ™•์ธ ๋ฒ„ํŠผ
Copy link
Member

Choose a reason for hiding this comment

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

์ฃผ์„ ์•„์ฃผ ์ ์ ˆํ•˜๋„ค์š”

Comment on lines +16 to +22
| typeof COMMON_SHEET_CONTENTS.ApproveCheck
| typeof COMMON_SHEET_CONTENTS.DeleteCheck
| typeof COMMON_SHEET_CONTENTS.DongilFailed
| typeof COMMON_SHEET_CONTENTS.GiveUpCheck
| typeof COMMON_SHEET_CONTENTS.GiveUpExceeded
| typeof COMMON_SHEET_CONTENTS.SelectProfile
| typeof COMMON_SHEET_CONTENTS.SheetCompleted;
Copy link
Member

Choose a reason for hiding this comment

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

์ €๋„ ์ฐธ๊ณ ํ•ด์„œ ๋ชจ๋‹ฌ RTK๋กœ migration ํ•˜๊ฒ ์Šต๋‹ˆ๋‹น

@sungwoo-shin sungwoo-shin merged commit e4cf5b8 into dev Aug 24, 2022
@sungwoo-shin sungwoo-shin deleted the refactor/bottomSheet branch August 24, 2022 09:16
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