[Refactor] improve api function #202
Merged
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.
๐ GET ํจ์ ๋ฆฌํํ ๋ง ๋ฐ ์ต๊ทผ ๋ฑ๋กํ ํ ์ผ SSR ์ ์ฉ
๐ ๋ณ๊ฒฝ ์ฌํญ ์์ฝ
๐ ๊ด๋ จ ์ด์
๐ ๋ณ๊ฒฝ ์ฌํญ ์์ธ ์ค๋ช
GET ํจ์ ๋ณ๊ฒฝ
axios์interceptor์์document๊ฐ์ฒด๋ฅผ ํ์ฉํด ๋ธ๋ผ์ฐ์ ์์๋ง ๊ฐ๋ฅํ ๋ฐฉ์์ด๋ผ ์๋ฒ ์ปดํฌ๋ํธ์์ ํ ํฐ์ ๋๊ฒจ์ฃผ๋ ๋ฐฉ์๋ ์ถ๊ฐ์์ผฐ์ต๋๋ค.props์ ํ ํฐ์ด ์์ผ๋ฉดsetAuthTokenํจ์๋ก ํค๋์ ๋ฃ์ด์ค๋๋ค.์ต๊ทผ ๋ฑ๋กํ ํ ์ผ SSR ์ ์ฉ
isLoading์ผ๋ก ๋ก๋ฉ์ ๊ด๋ฆฌํ๋ ๊ฒ๋ณด๋คSuspense๋ก ๊ด๋ฆฌํ๋ ๊ฒ์ด ์ข์ ๊ฒ ๊ฐ์ ๋ณ๊ฒฝํ์์ต๋๋ค.not-found ์ฌ์ด๋๋ฐ ์ญ์
โ ํ์ธ ์ฌํญ
๐ธ ์คํฌ๋ฆฐ์ท (์ ํ ์ฌํญ)
๊ธฐ์กด
2025-03-06.3.19.50.mov
์ ์ฉ ํ
2025-03-06.3.21.10.mov
๊ธฐํ ์ฐธ๊ณ ์ฌํญ
์ถ๊ฐ๋ก ๊ณต์ ํ๊ณ ์ถ์ ๋ด์ฉ์ด๋ ์ฐธ๊ณ ์๋ฃ๊ฐ ์๋ค๋ฉด ์ฌ๊ธฐ์ ์์ฑํด์ฃผ์ธ์.