Feature/auth guard myprofile #114
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.
๐ฆ Pull Request
๐ ์์ฝ(Summary)
๋ง์ดํ๋กํ ํ์ด์ง(MyProfile)์ ๋ก๊ทธ์ธ ๊ฐ๋ ๋ก์ง ์ ์ฉ
isUserLoading์ํ๋ฅผ ํ์ฉํด ์ฌ์ฉ์ ์ ๋ณด ๋ก๋ฉ ์๋ฃ ์ฌ๋ถ ์ฒดํฌ๋ก๋ฉ ์ค์ผ ๋ ์ ์ฒด ํ๋ฉด์ LoadingOverlay ํ์
return <div>๋ก๋ฉ ์ค...</div>๋ฐฉ์์ ์ ๊ฑฐํ๊ณ , UI ๊น๋นก์ ๋ฐฉ์ง ์ฒ๋ฆฌisUserLoading && <LoadingOverlay />๋ก ์์ฐ์ค๋ฝ๊ฒ ์ฒ๋ฆฌ๐ฌ ๊ณต์ ์ฌํญ to ๋ฆฌ๋ทฐ์ด
zustand์isUserLoading์ํ๊ฐ ์์ด์ผ ํ๊ณ ,useInitUser()์์ ์ด๋ฅผ ์ ํํ ์ฒ๋ฆฌํด์ผ ์ ์ ์๋ํฉ๋๋ค.๐๏ธ ๊ด๋ จ ์ด์
๐ธ ์คํฌ๋ฆฐ์ท
๋น๋ก๊ทธ์ธ ์ํ๋ก ์ ๊ทผ
https://github.com/user-attachments/assets/69f4acde-de78-41b9-a362-f0e02401f21c
์๋ก๊ณ ์นจ
https://github.com/user-attachments/assets/b6e5e71a-826e-4b06-b09d-511b95e14b5d
โ ์ฒดํฌ๋ฆฌ์คํธ