-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
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.
μκ³ νμ ¨μ΅λλΉ κΆκΈνκ±° λͺκ° μ§λ¬Έλ¨κ²Όμ΄μ!
frontend/src/apis/pairRoom.ts
Outdated
export const updatePairRoomStatus = async ({ accessCode }: UpdatePairRoomStatusRequest) => { | ||
await fetcher.patch({ | ||
url: `${API_URL}/pair-room/${accessCode}/complete`, | ||
errorMessage: '', |
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.
μΆκ°νμ΅λλ€!
@@ -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)} /> |
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.
νμ΄λ£Έμ μ’
λ£νλ λ²νΌμ΄λΌ DeleteButton λ€μ΄λ°μ΄ μ μ νμ§ μμ κ² κ°μμ
κ·Έλ¦¬κ³ PairRoomDeleteModalμλ νμ΄λ£Έμ μ’
λ£νκ² μ΅λκΉ ? + νμ΄λ£Έμ μ’
λ£νλ©΄ νκ³ νμ΄μ§λ‘ μ΄λν©λλ€. μ κ°μ λ΄μ©μ΄ λ€μ΄μμ΄λ μ’μ κ² κ°μμ!
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.
μμ νμ΅λλ€ π
const checkPairRoomExists = async () => { | ||
if (!accessCode) navigate('/error'); | ||
|
||
const { exists } = await getPairRoomExists(accessCode || ''); |
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.
accessCode κ° μμΌλ©΄ error νμ΄μ§λ‘ μ΄λνλλ° accessCode || ''λ‘ μ²λ¦¬ν΄ μ€ μ΄μ κ° μμκΉμ??
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.
μΆκ°λ‘ getPairRoomExists μμ² μμ²΄κ° μ€ν¨νμλμλ μλ¬μ²λ¦¬λ₯Ό ν΄ μ£Όμ΄μΌ ν κ² κ°μ΅λλ€! getPairRoomExists μμ²μ΄ μ€ν¨νλ©΄ λ°μ΄ν° μλ λΉ λ°©μ μ
μ₯νκ² λλ κ² κ°μμ.
(κ·Όλ° μ΄ μλ¬λ μΆνμ μ²λ¦¬ν΄λ μ’μ κ² κ°μμ₯)
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.
accessCode κ° μμΌλ©΄ error νμ΄μ§λ‘ μ΄λνλλ° accessCode || ''λ‘ μ²λ¦¬ν΄ μ€ μ΄μ κ° μμκΉμ??
const accessCode = useParams().accessCode;
μμ accessCode
μ κ°μ΄ undefinedμΌ μ μμ΄ typescriptκ° μλ¬λ₯Ό λ°νν΄μ π₯²
μΆκ°λ‘ getPairRoomExists μμ² μμ²΄κ° μ€ν¨νμλμλ μλ¬μ²λ¦¬λ₯Ό ν΄ μ£Όμ΄μΌ ν κ² κ°μ΅λλ€! getPairRoomExists μμ²μ΄ μ€ν¨νλ©΄ λ°μ΄ν° μλ λΉ λ°©μ μ μ₯νκ² λλ κ² κ°μμ.
μκ±°λ νμ¬λ¦¬λ μ¬κΈ° μμ μ€μ΄λΌ νμ¬λ¦¬ μ½λκΉμ§ λ¨Έμ§λκ³ λμ νλ²μ μ²λ¦¬ν΄ μ£Όκ² μ΅λλ€!
|
||
const { driver, navigator, missionUrl, isFetching } = useGetPairRoom(accessCode || ''); | ||
|
||
if (isFetching) { |
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.
Appμμ <Suspense fallback={}>
μ²λ¦¬λ₯Ό ν΄ μ€¬λλ° λ‘λ©μ²λ¦¬κ° μ€λ³΅λ κ² κ°μμ!
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.
Appμ Suspenseλ₯Ό μμ νμ΅λλ€!
|
||
return ( | ||
<S.Layout> | ||
<S.CompletedPairRoomInformationContainer> |
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.
πππππμ λλ©μ΄μ 짱μ΄λ€μ
const checkPairRoomExists = async () => { | ||
if (!accessCode) navigate('/error'); | ||
|
||
const { exists } = await getPairRoomExists(accessCode || ''); |
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.
μΆκ°λ‘ 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'; |
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.
μ»΄ν¬λνΈ μ΄λ¦ μ§μ§ μ€κ»νλ€μ π
handleSelectCategory: (categoryId: string) => void; | ||
} | ||
|
||
const CategoryItem = ({ closeModal, categoryName, categoryId, isChecked, handleSelectCategory }: CategoryItemProps) => { |
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.
νΉμ μ΄λ κ² ReferenceCard
μμ CategoryManagementModal
μμ CategoriesEditor
μμ CategoryItem
μ΄ μλ μ΄μ κ° μλμ? μ»΄ν¬λνΈ κ²½λ‘κ° λ무 κΈΈμ΄μ§λ κ±° κ°μμμ π€
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.
κΈνκ² μλ νμΌ κ΅¬μ‘° κ·Έλλ‘ λ°μ€λλΌ νμμλ κ΅¬μ‘°κ° μκ²Όλ€μ!
CategoriesEditor λ¨κ³λ₯Ό μμ νμ΅λλ€ π
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.
@@ -0,0 +1,29 @@ | |||
import ReadonlyCategoryItem from '@/components/CompletedPairRoom/ReferenceCard/CategoryManagementModal/CategoriesEditor/CategoryItem/ReadonlyCategoryItem/ReadonlyCategoryItem'; |
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.
μ¬κΈ°λ§ λ΄λ...
return ( | ||
<S.Layout> | ||
<S.Container> | ||
<ReadonlyCategoryItem |
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.
ReadonlyCategoryItem
μμ λ‘μ§μ΄ λ§μ§ μμμ λ°λ‘ μ»΄ν¬λνΈλ‘ λΆλ¦¬λμ΄ μμ§ μμλ λ κ±° κ°μμ. μ§κΈ μ΄ μ»΄ν¬λνΈκ° λ°λ‘ λλ©μΈ λ‘μ§μ΄ μμ΄μ κ»λ°κΈ° μν μ νκ³ μλ κ±° κ°μ΅λλ€!
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.
μ¬κΈ°λ μ€μμ΅λλ€!
}; | ||
|
||
return ( | ||
<Modal isOpen={isOpen} close={closeCategoryManagementModal} size="45rem"> |
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.
κ·Έλ₯ closeModal
μ μ¨λ λμ§ μλμ?
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.
μ§κΈ νμΈν΄λ³΄λ λ³μλͺ
μ΄ μ€κ°μ νλ² κΈΈκ² λ°λ λΆλΆμ΄ μλ€μ!
μμ νμ΅λλ€ π
<> | ||
<S.Layout> | ||
<PairRoomCard> | ||
<Header selectedFilteringCategoryName={selectedFilteringCategoryName} onButtonClick={openModal} /> |
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.
selectedFilteringCategoryName
μ΄κ±° λ³μλͺ
μ μ€μΌ μ μλ λ°©λ²μ μμκΉμ...
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.
μ½λ λ€μ΄μ΄νΈκ° μκΈνκ΅°μ
|
||
const CompletedPairRoom = () => { | ||
const navigate = useNavigate(); | ||
const accessCode = useParams().accessCode; |
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.
const accessCode = useParams().accessCode; | |
const { accessCode } = useParams() |
μ΄λ κ² μ°λ 건 μ΄λ€κ°μ?
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.
μμ νμ΅λλ€!
const navigate = useNavigate(); | ||
const accessCode = useParams().accessCode; | ||
|
||
const userStatus = useUserStore((state) => state.userStatus); |
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.
const userStatus = useUserStore((state) => state.userStatus); | |
const { userStatus } = useUserStore(); |
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.
μμ νμ΅λλ€!
handleSelectCategory: (categoryId: string) => void; | ||
} | ||
|
||
const CategoryItem = ({ closeModal, categoryName, categoryId, isChecked, handleSelectCategory }: CategoryItemProps) => { |
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.
μ°κ΄λ μ΄μ
π§
ꡬνν κΈ°λ₯
μλ£ μν νμ΄λ£Έμ 1μ°¨ ꡬννμ΅λλ€. μ΄ν λμ€λ apiλ₯Ό νμΈνκ³ 2μ°¨ μμ ν μμ μ λλ€.
μμΈ μ€λͺ
π€