โจ Syncronize event registration state without refresh - #187
Merged
Merged
Conversation
โฆy to update details without refresh
This was referenced Jun 15, 2026
young-52
approved these changes
Jun 16, 2026
young-52
left a comment
Member
There was a problem hiding this comment.
- ์ฅ๊ธฐ์ ์ผ๋ก๋ TanStack Query ๊ธฐ๋ฐ์ผ๋ก ํต์ผํ๋ ๊ฒ ์ข์ ๊ฒ ๊ฐ๊ธฐ๋ ํฉ๋๋ค. ๋ฆฌํฉํ ๋งํ ๊ฒ ์์ฌ ๊ฐ๋ค์โฆ
AGENTS.md์ฌ๋ ค์ฃผ์๋ฉด ๊ฐ์ฌํ ์ฐ๊ฒ ์ต๋๋ค ใ ใ
young-52
added a commit
that referenced
this pull request
Jun 26, 2026
### ๐ ์์ ๋ด์ฉ ๋น๋ก๊ทธ์ธ ์ ์ ์ ์ผ์ ์ฐธ์ฌ ์ ์ฒญ์ผ๋ก ์ธํด ์๊ธด `regId`๊ฐ ์ฌ๋ผ์ง์ง ์๊ณ ์ํฅ์ ์ฃผ๋ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๊ธฐ ์ํด `regId`์ ์๋ช ์ฃผ๊ธฐ๊ฐ ๋๋๋ฉด ์ญ์ ํ๋๋ก ์์ ํ์ต๋๋ค. ์์ธํ `regId` ์ญ์ ๊ธฐ์ค์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค. - ๋ก๊ทธ์ธ / ๋ก๊ทธ์์์ ๋ชจ๋ `regId`๋ฅผ ์ ๊ฑฐํฉ๋๋ค. ์ถ๊ฐ๋ก ๋ก๊ทธ์ธ ์ํ์์๋ ๋ก์ปฌ์คํ ๋ฆฌ์ง์ Url์ `regId`๋ฅผ ๋ฌด์ํฉ๋๋ค. - ๋น๋ก๊ทธ์ธ ์ ์ ๊ฐ ์ ์ฒญ์ ์ทจ์ํ๋ฉด ํด๋น ์ด๋ฒคํธ์ `regId`๋ฅผ ์ ๊ฑฐํ๊ณ , Url์ `?regId=`๋ ์ ๊ฑฐํฉ๋๋ค. - `getRegistrationDetail(regId)`๊ฐ `401`, `403`, `404`๋ก ์คํจํ๋ฉด ์ค๋๋ ๋ก์ปฌ ์ํ๋ฅผ ๋ง๊ธฐ ์ํด ๋ก์ปฌ์คํ ๋ฆฌ์ง์ Url์ `regId`๋ฅผ ์ ๊ฑฐํฉ๋๋ค. - ํ ์ด๋ฒคํธ์์ 2๊ฐ ์ด์์ ๋น๋ก๊ทธ์ธ ์ ์ฒญ์ด ๋ฐ์ํ ๊ฒฝ์ฐ, ๊ธฐ์กด `regId`๋ฅผ ์ ๊ฑฐํ๊ณ ๊ฐ์ฅ ์ต์ ์ `regId`๋ง ์ ์งํฉ๋๋ค. - ์ฃผ์ต์์ ๊ฐ์ ์ทจ์๋ก ์ธํด `BANNED`๊ฐ ๋๋ ๊ฒฝ์ฐ์๋ ๋ค์ ์ ์ฒญ ๋ถ๊ฐ๋ฅํ๋ค๋ ํ์ด์ง๋ฅผ ํ์ํ๊ธฐ ์ํด `regId`๋ฅผ ์ญ์ ํ์ง ์๊ณ ์ ์งํฉ๋๋ค. ### ๐ธ ์คํฌ๋ฆฐ์ท (์ ํ) ### ๐ ๋ฆฌ๋ทฐ ์๊ตฌ์ฌํญ (์ ํ) - dev๊ฐ ์๋ #187 ์ ๋ธ๋์น ์์์ ์์ ํ์ฌ ์ด pr ๋จธ์ง ์ด์ 187์ ์ฐ์ ์ ์ผ๋ก ๋จธ์งํด์ผ ํฉ๋๋ค. - #171 pr์ด ๋จธ์ง๋๋ฉด 187๊ณผ ์ด pr ๋จธ์ง ์ปจํ๋ฆญํธ ํด๊ฒฐํ๊ณ ๋ค์ ๋ฆฌ๋ทฐ์์ฒญ ๋๋ฆฌ๊ฒ ์ต๋๋ค! --------- Co-authored-by: Park Junyoung <bloomwayz@snu.ac.kr>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
๐ ์์ ๋ด์ฉ
์ฐธ์ฌ ์ ์ฒญ/์ทจ์/๊ฐ์ ์ทจ์ ์ดํ ์๋ก๊ณ ์นจํ์ง ์์๋ ์๋์ผ๋ก ์ผ์ ์ ๋ฐ์ดํฐ๋ค์ด ๊ฐฑ์ ๋๋๋ก ์์ ํ์ต๋๋ค.
๊ธฐ์กด์๋ ๊ฐฑ์ ํด์ผ ํ๋ ์๋ฒ ์ํ๊ฐ ์ฌ๋ฌ ๊ณณ์ ํฉ์ด์ ธ ์๊ณ , ๊ฐ ํ๋ฉด์ด ์๋ก ๋ค๋ฅธ ๋ฐฉ์์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ๋ค๊ณ ์์์ต๋๋ค.
EventMain.tsx๋ ๋ชจ์ ์์ธ ๋ฐ์ดํฐ๋ฅผuseEventDetail๋ด๋ถuseState๋ก ๋ค๊ณ ์์ต๋๋ค.Guests.tsx๋ ์ฐธ์ฌ์ ๋ชฉ๋ก์ TanStack Query์['guests', eventId, filters]์บ์๋ก ๋ค๊ณ ์์ต๋๋ค.['myRegistrations'],['myEvents']์บ์๋ฅผ ์ฌ์ฉํฉ๋๋ค.๋ชจ๋ ํ์ด์ง์์ TanStack Query ๊ธฐ๋ฐ์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ์ ๋ฆฌํ๊ฒ ์์ ํ๊ณ , mutation ์ฑ๊ณต ํ ๊ด๋ จ query key๋ฅผ ํ ๊ณณ์์ ๊ฐ์ด ๋ฌดํจํํ๋ ๋ฐฉ์์ผ๋ก ์ฝ๋๋ฅผ ์์ ํ์ต๋๋ค. MSW์ ์ฐธ์ฌ์ ๊ดํ ๋ก์ง์ ์์ฑํ์ฌ ๋ก์ปฌ ์๋ฒ์์ ์๋ก๊ณ ์นจ ์์ด ๋ฐ์ดํฐ๊ฐ ๊ฐฑ์ ๋๋ ๊ฒ์ ํ์ธํ์ต๋๋ค.
๊ตฌ์ฒด์ ์ธ ์์ ๋ด์ฉ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
useEventDetail์ ์์ธ ์กฐํ๋ฅผ TanStack Query ๊ธฐ๋ฐ์ผ๋ก ์ ํGuests.tsx๋refetch()๋์ query invalidation ์ฌ์ฉ๐ธ ์คํฌ๋ฆฐ์ท (์ ํ)
๐ ๋ฆฌ๋ทฐ ์๊ตฌ์ฌํญ (์ ํ)
TanStack Query ๊ธฐ๋ฐ์ผ๋ก ์์ ํ๋ ๊ณผ์ ์์, ๊ธฐ์กด์ ์ด๋ฏธ ์ฌ์ฉํ๊ณ ์๋ query key์ธ ํ์ ๋ด ์ ์ฒญ ๋ชฉ๋ก
['myRegistrations']๊ณผ ๋ด๊ฐ ๋ง๋ ๋ชจ์ ๋ชฉ๋ก['myEvents']์constants/queryKeys.ts์์legacy๋ก ๋ฌถ์์ต๋๋ค. ๊ธฐ์กด query key๋ ๊ด๋ฆฌ๋ฅผ ํธํ๊ฒ ํ๊ธฐ ์ํด์queryKeys.registrations.me()๋ก ๋ณ๊ฒฝํ ์ ์์์ง๋ง, ์ฐ์ ์ด๋ฒ ์์ ์์๋ ๊ธฐ์กด ์ฝ๋๋ฅผ ์ ์งํ์ต๋๋ค. ์ฅ๊ธฐ์ ์ผ๋ก TanStack Query๋ฅผ ์ด์ฉํ๋ค๋ฉด ๋ค๋ฅธ pr๋ก ์์ ํ๊ฒ ์ต๋๋ค.์ํฐ๊ทธ๋๋นํฐ -> ์ฝ๋ฑ์ค๋ก ai ํด์ ๋ณ๊ฒฝํ๋๋ฐ, ์ฝ๋ฑ์ค์์๋
AGENTS.mdํ์ผ์ ํ๋ก์ ํธ ๋ฃจํธ์ ์์น์ํต๋๋ค. ์ด๋ฅผ ๊นํ๋ธ์ ์ฌ๋ฆด๊น์? ์๋๋ฉด.gitignore๋ก ์ฒ๋ฆฌํ ๊น์?๐ Fix double header in mobile uiย #171 pr ๋จผ์ ๋จธ์งํด์ฃผ์ค ์ ์๋์? ์ด pr ๋จผ์ ๋จธ์งํ๋ฉด 171์์ conflict๊ฐ ์ด๋ง์ด๋ง ํ ๊ฒ ๊ฐ์์์...