-
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
๐ ๊ฑฐ๋ ์ ์ ๋ก์ง ๊ตฌํ #67
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.
์ฃผ์ฐ๋, ์ฝ๋ ์์ฑํ์๋๋ผ ๊ณ ์ํ์ จ์ต๋๋ค!
</TabsList> | ||
{['offer', 'poke'].map((type) => ( | ||
{['OFFER', 'POKE'].map((type) => ( |
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.
Tab Content์ ๋ด์ฉ์ด ๋ง์์ ํ์ด์ ์ฐ์ง ์๊ณ map์ผ๋ก ๋ฌถ์์ต๋๋ค!
src/app/(root)/(routes)/items/[itemId]/components/trade-section/TradeSection.tsx
Show resolved
Hide resolved
import { postSuggestion } from '@/services/suggest/suggest' | ||
import { ItemSuggestion } from '@/types' | ||
|
||
const useSuggestMutation = (toCardId: number, fromCardId: number) => { |
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.
useSuggestMutation ๊ฐ์ ๊ฒฝ์ฐ ๊ธฐ์กด ์ํ๋ฅผ ์
๋ฐ์ดํธ ํ๋๊ฒ์ผ๋ก ๋ณด์ด๋๋ฐ
ํจ์๋ช
์ useSuggestUpdateMutation์ผ๋ก ํ๋๊ฒ ๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค!
const indexToUpdate = previousSuggestions.findIndex( | ||
(suggestion) => suggestion.cardId === fromCardId, | ||
) | ||
updateSuggestions[indexToUpdate].suggestionStatus = 'WAITING' | ||
queryClient.setQueryData(queryKey, updateSuggestions) | ||
|
||
return { previousSuggestions } |
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.
ํน์ UI๊ฐ ๋ฐ๋์ง ์๋ ์ด์๊ฐ ํด๊ฒฐ๋์ จ๋์?
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.
actions ๊ฒฐ๊ณผ๋ฅผ ๋ค์ ํ์ธํด์ฃผ์ธ์. -์๋์ผ๋ก ์์ฑ๋จ-
- ๋ชฉ์
๊ด๋ จ ํฐ์ผ ๋ฒํธ: 163
- ์ฃผ์ ๋ณ๊ฒฝ ์ฌํญ
๊ธฐํ ์ฌํญ (์ ํ)
- ์คํฌ๋ฆฐ์ท (์ ํ)