-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 팔로워 팔로잉 상태 유지 및 페이지 이동에도 반영하기 위해 zustand로 관리
- Loading branch information
Showing
3 changed files
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { create } from 'zustand'; | ||
|
||
export enum FriendType { | ||
Follower = 'Follower', | ||
Following = 'Following', | ||
} | ||
|
||
interface FriendStore { | ||
selectedType: FriendType; | ||
setSelectedType: (mode: FriendType) => void; | ||
} | ||
|
||
const useFriendStore = create<FriendStore>((set) => ({ | ||
selectedType: FriendType.Follower, | ||
setSelectedType: (selectedType) => { | ||
set({ selectedType }); | ||
}, | ||
})); | ||
|
||
export default useFriendStore; |
eb4524a
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.
Successfully deployed to the following URLs:
pickly – ./
pickly.vercel.app
pickly-git-develop-pickly-team.vercel.app
app.pickly.today
pickly-pickly-team.vercel.app