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

[FE] 🚧 μ™„λ£Œ μƒνƒœ νŽ˜μ–΄λ£Έ 1μ°¨ κ΅¬ν˜„ #820

Merged
merged 14 commits into from
Oct 18, 2024

Conversation

greetings1012
Copy link
Contributor

μ—°κ΄€λœ 이슈

🚧

κ΅¬ν˜„ν•œ κΈ°λŠ₯

μ™„λ£Œ μƒνƒœ νŽ˜μ–΄λ£Έμ„ 1μ°¨ κ΅¬ν˜„ν–ˆμŠ΅λ‹ˆλ‹€. 이후 λ‚˜μ˜€λŠ” apiλ₯Ό ν™•μΈν•˜κ³  2μ°¨ μˆ˜μ •ν•  μ˜ˆμ •μž…λ‹ˆλ‹€.

상세 μ„€λͺ…

πŸ€—

Copy link
Contributor

@dle234 dle234 left a comment

Choose a reason for hiding this comment

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

μˆ˜κ³ ν•˜μ…¨μŠ΅λ‹ˆλ‹Ή κΆκΈˆν•œκ±° λͺ‡κ°œ μ§ˆλ¬Έλ‚¨κ²Όμ–΄μš”!

export const updatePairRoomStatus = async ({ accessCode }: UpdatePairRoomStatusRequest) => {
await fetcher.patch({
url: `${API_URL}/pair-room/${accessCode}/complete`,
errorMessage: '',
Copy link
Contributor

Choose a reason for hiding this comment

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

저희 μ§€κΈˆ μ—λŸ¬ 핸듀링을 μ œλŒ€λ‘œ μ•ˆ ν•΄λ†”μ„œ μ—λŸ¬ 메세지가 μžˆλŠ”κ²Œ 쒋을 것 κ°™μ•„μš”!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

μΆ”κ°€ν–ˆμŠ΅λ‹ˆλ‹€!

@@ -30,7 +32,7 @@ const PairListCard = ({ driver, navigator, missionUrl, roomCode }: PairListCardP
<RoomCodeSection isOpen={isOpen} roomCode={roomCode} />
{missionUrl !== '' && <RepositorySection isOpen={isOpen} missionUrl={missionUrl} />}
<PairListSection isOpen={isOpen} driver={driver} navigator={navigator} />
{/* <DeleteButton isOpen={isOpen} onRoomDelete={onRoomDelete} /> */}
<DeleteButton isOpen={isOpen} onClick={() => handleCompletePairRoom(roomCode)} />
Copy link
Contributor

Choose a reason for hiding this comment

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

νŽ˜μ–΄λ£Έμ„ μ’…λ£Œν•˜λŠ” λ²„νŠΌμ΄λΌ DeleteButton 넀이밍이 μ μ ˆν•˜μ§€ μ•Šμ€ 것 κ°™μ•„μš”
그리고 PairRoomDeleteModal에도 νŽ˜μ–΄λ£Έμ„ μ’…λ£Œν•˜κ² μŠ΅λ‹ˆκΉŒ ? + νŽ˜μ–΄λ£Έμ„ μ’…λ£Œν•˜λ©΄ 회고 νŽ˜μ΄μ§€λ‘œ μ΄λ™ν•©λ‹ˆλ‹€. 와 같은 λ‚΄μš©μ΄ λ“€μ–΄μžˆμ–΄λ„ 쒋을 것 κ°™μ•„μš”!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€ πŸ‘

const checkPairRoomExists = async () => {
if (!accessCode) navigate('/error');

const { exists } = await getPairRoomExists(accessCode || '');
Copy link
Contributor

Choose a reason for hiding this comment

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

accessCode κ°€ μ—†μœΌλ©΄ error νŽ˜μ΄μ§€λ‘œ μ΄λ™ν•˜λŠ”λ° accessCode || ''둜 μ²˜λ¦¬ν•΄ μ€€ μ΄μœ κ°€ μžˆμ„κΉŒμš”??

Copy link
Contributor

Choose a reason for hiding this comment

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

μΆ”κ°€λ‘œ getPairRoomExists μš”μ²­ μžμ²΄κ°€ μ‹€νŒ¨ν–ˆμ„λ•Œμ—λ„ μ—λŸ¬μ²˜λ¦¬λ₯Ό ν•΄ μ£Όμ–΄μ•Ό ν•  것 κ°™μŠ΅λ‹ˆλ‹€! getPairRoomExists μš”μ²­μ΄ μ‹€νŒ¨ν•˜λ©΄ 데이터 μ—†λŠ” 빈 방에 μž…μž₯ν•˜κ²Œ λ˜λŠ” 것 κ°™μ•„μš”.
(근데 이 μ—λŸ¬λŠ” 좔후에 μ²˜λ¦¬ν•΄λ„ 쒋을 것 κ°™μ•„μš₯)

Copy link
Contributor Author

@greetings1012 greetings1012 Oct 17, 2024

Choose a reason for hiding this comment

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

accessCode κ°€ μ—†μœΌλ©΄ error νŽ˜μ΄μ§€λ‘œ μ΄λ™ν•˜λŠ”λ° accessCode || ''둜 μ²˜λ¦¬ν•΄ μ€€ μ΄μœ κ°€ μžˆμ„κΉŒμš”??

const accessCode = useParams().accessCode; μ—μ„œ accessCode의 값이 undefined일 수 μžˆμ–΄ typescriptκ°€ μ—λŸ¬λ₯Ό λ°˜ν™˜ν•΄μš” πŸ₯²

μΆ”κ°€λ‘œ getPairRoomExists μš”μ²­ μžμ²΄κ°€ μ‹€νŒ¨ν–ˆμ„λ•Œμ—λ„ μ—λŸ¬μ²˜λ¦¬λ₯Ό ν•΄ μ£Όμ–΄μ•Ό ν•  것 κ°™μŠ΅λ‹ˆλ‹€! getPairRoomExists μš”μ²­μ΄ μ‹€νŒ¨ν•˜λ©΄ 데이터 μ—†λŠ” 빈 방에 μž…μž₯ν•˜κ²Œ λ˜λŠ” 것 κ°™μ•„μš”.

μš”κ±°λŠ” νŒŒμŠ¬λ¦¬λ„ μ—¬κΈ° μž‘μ—…μ€‘μ΄λΌ 파슬리 μ½”λ“œκΉŒμ§€ λ¨Έμ§€λ˜κ³  λ‚˜μ„œ ν•œλ²ˆμ— μ²˜λ¦¬ν•΄ μ£Όκ² μŠ΅λ‹ˆλ‹€!


const { driver, navigator, missionUrl, isFetching } = useGetPairRoom(accessCode || '');

if (isFetching) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Appμ—μ„œ <Suspense fallback={}>

처리λ₯Ό ν•΄ μ€¬λŠ”λ° λ‘œλ”©μ²˜λ¦¬κ°€ μ€‘λ³΅λœ 것 κ°™μ•„μš”!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

App의 Suspenseλ₯Ό μ‚­μ œν–ˆμŠ΅λ‹ˆλ‹€!


return (
<S.Layout>
<S.CompletedPairRoomInformationContainer>
Copy link
Contributor

Choose a reason for hiding this comment

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

πŸ‘πŸ‘πŸ‘πŸ‘πŸ‘μ• λ‹ˆλ©”μ΄μ…˜ μ§±μ΄λ„€μš”

const checkPairRoomExists = async () => {
if (!accessCode) navigate('/error');

const { exists } = await getPairRoomExists(accessCode || '');
Copy link
Contributor

Choose a reason for hiding this comment

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

μΆ”κ°€λ‘œ getPairRoomExists μš”μ²­ μžμ²΄κ°€ μ‹€νŒ¨ν–ˆμ„λ•Œμ—λ„ μ—λŸ¬μ²˜λ¦¬λ₯Ό ν•΄ μ£Όμ–΄μ•Ό ν•  것 κ°™μŠ΅λ‹ˆλ‹€! getPairRoomExists μš”μ²­μ΄ μ‹€νŒ¨ν•˜λ©΄ 데이터 μ—†λŠ” 빈 방에 μž…μž₯ν•˜κ²Œ λ˜λŠ” 것 κ°™μ•„μš”.
(근데 이 μ—λŸ¬λŠ” 좔후에 μ²˜λ¦¬ν•΄λ„ 쒋을 것 κ°™μ•„μš₯)

@@ -8,6 +8,7 @@ const PairRoom = lazy(() => import('@/pages/PairRoom/PairRoom'));

import Callback from '@/pages/Callback/Callback';
import CoduoDocs from '@/pages/CoduoDocs/CoduoDocs';
import CompletedPairRoom from '@/pages/CompletedPairRoom/CompletedPairRoom';
Copy link
Contributor

Choose a reason for hiding this comment

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

μ»΄ν¬λ„ŒνŠΈ 이름 μ§„μ§œ μŠ€κ»„ν•˜λ„€μš” 😭

handleSelectCategory: (categoryId: string) => void;
}

const CategoryItem = ({ closeModal, categoryName, categoryId, isChecked, handleSelectCategory }: CategoryItemProps) => {
Copy link
Contributor

@anttiey anttiey Oct 17, 2024

Choose a reason for hiding this comment

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

ν˜Ήμ‹œ μ΄λ ‡κ²Œ ReferenceCard μ•ˆμ— CategoryManagementModal μ•ˆμ— CategoriesEditor μ•ˆμ— CategoryItem 이 μžˆλŠ” μ΄μœ κ°€ μžˆλ‚˜μš”? μ»΄ν¬λ„ŒνŠΈ κ²½λ‘œκ°€ λ„ˆλ¬΄ κΈΈμ–΄μ§€λŠ” κ±° κ°™μ•„μ„œμš” πŸ€”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

κΈ‰ν•˜κ²Œ μ›λž˜ 파일 ꡬ쑰 κ·ΈλŒ€λ‘œ λ”°μ˜€λŠλΌ ν•„μš”μ—†λŠ” ꡬ쑰가 μƒκ²Όλ„€μš”!
CategoriesEditor 단계λ₯Ό μ‚­μ œν–ˆμŠ΅λ‹ˆλ‹€ πŸ‘

Copy link
Contributor

Choose a reason for hiding this comment

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

스크란샷 2024-10-18 α„‹α…©α„Œα…₯ᆫ 10 55 46

폴더 ꡬ쑰가 μ΄λ ‡κ²Œ λ³΄μ΄λŠ”λ° μ•ˆμ— CategoryItem 만 μžˆμ–΄μ„œ ν˜Ήμ‹œ μƒμœ„μ— CategoriesEditor 폴더가 μžˆλŠ” κ±°λ©΄ μ œκ±°ν•˜κ³  CategoryItem ν΄λ”λ§Œ 남겨도 될 κ±° κ°™λ„€μš”!

@@ -0,0 +1,29 @@
import ReadonlyCategoryItem from '@/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoriesEditor/CategoryItem/ReadonlyCategoryItem/ReadonlyCategoryItem';
Copy link
Contributor

@anttiey anttiey Oct 17, 2024

Choose a reason for hiding this comment

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

μ—¬κΈ°λ§Œ 봐도...

return (
<S.Layout>
<S.Container>
<ReadonlyCategoryItem
Copy link
Contributor

@anttiey anttiey Oct 17, 2024

Choose a reason for hiding this comment

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

ReadonlyCategoryItem μ•ˆμ˜ 둜직이 λ§Žμ§€ μ•Šμ•„μ„œ λ”°λ‘œ μ»΄ν¬λ„ŒνŠΈλ‘œ λΆ„λ¦¬λ˜μ–΄ μžˆμ§€ μ•Šμ•„λ„ 될 κ±° κ°™μ•„μš”. μ§€κΈˆ 이 μ»΄ν¬λ„ŒνŠΈκ°€ λ”°λ‘œ 도메인 둜직이 μ—†μ–΄μ„œ 껍데기 역할을 ν•˜κ³  μžˆλŠ” κ±° κ°™μŠ΅λ‹ˆλ‹€!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

여기도 μ€„μ˜€μŠ΅λ‹ˆλ‹€!

};

return (
<Modal isOpen={isOpen} close={closeCategoryManagementModal} size="45rem">
Copy link
Contributor

Choose a reason for hiding this comment

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

κ·Έλƒ₯ closeModal 을 써도 λ˜μ§€ μ•Šλ‚˜μš”?

Copy link
Contributor Author

@greetings1012 greetings1012 Oct 18, 2024

Choose a reason for hiding this comment

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

μ§€κΈˆ ν™•μΈν•΄λ³΄λ‹ˆ λ³€μˆ˜λͺ…이 쀑간에 ν•œλ²ˆ 길게 바뀐 뢀뢄이 μžˆλ„€μš”!
μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€ πŸ‘

<>
<S.Layout>
<PairRoomCard>
<Header selectedFilteringCategoryName={selectedFilteringCategoryName} onButtonClick={openModal} />
Copy link
Contributor

Choose a reason for hiding this comment

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

selectedFilteringCategoryName 이거 λ³€μˆ˜λͺ…을 쀄일 수 μžˆλŠ” 방법은 μ—†μ„κΉŒμš”...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

원본 μ½”λ“œμ™€ 같은 이름이라 λ¦¬νŒ©ν„°λ§ν•  λ•Œ ν•œ λ²ˆμ— 고쳐야 ν•  것 κ°™μ•„μš” πŸ₯²

Copy link
Contributor

Choose a reason for hiding this comment

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

μ½”λ“œ λ‹€μ΄μ–΄νŠΈκ°€ μ‹œκΈ‰ν•˜κ΅°μš” ⚠️


const CompletedPairRoom = () => {
const navigate = useNavigate();
const accessCode = useParams().accessCode;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const accessCode = useParams().accessCode;
const { accessCode } = useParams()

μ΄λ ‡κ²Œ μ“°λŠ” 건 μ–΄λ–€κ°€μš”?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€!

const navigate = useNavigate();
const accessCode = useParams().accessCode;

const userStatus = useUserStore((state) => state.userStatus);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const userStatus = useUserStore((state) => state.userStatus);
const { userStatus } = useUserStore();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€!

handleSelectCategory: (categoryId: string) => void;
}

const CategoryItem = ({ closeModal, categoryName, categoryId, isChecked, handleSelectCategory }: CategoryItemProps) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

스크란샷 2024-10-18 α„‹α…©α„Œα…₯ᆫ 10 55 46

폴더 ꡬ쑰가 μ΄λ ‡κ²Œ λ³΄μ΄λŠ”λ° μ•ˆμ— CategoryItem 만 μžˆμ–΄μ„œ ν˜Ήμ‹œ μƒμœ„μ— CategoriesEditor 폴더가 μžˆλŠ” κ±°λ©΄ μ œκ±°ν•˜κ³  CategoryItem ν΄λ”λ§Œ 남겨도 될 κ±° κ°™λ„€μš”!

@greetings1012 greetings1012 merged commit 03c8df0 into FE/dev Oct 18, 2024
1 check passed
@greetings1012 greetings1012 deleted the FE/feature/#800 branch October 18, 2024 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
πŸ§‘β€πŸ’» feat μ‹ κ·œ κΈ°λŠ₯ 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants