feat(WEB-170): edit profile view
This commit is contained in:
23
stores/edit-profile.ts
Normal file
23
stores/edit-profile.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { create } from "zustand"
|
||||
|
||||
interface EditProfileState {
|
||||
pending: boolean
|
||||
valid: boolean
|
||||
}
|
||||
|
||||
interface EditProfileActions {
|
||||
setIsPending: (isPending: boolean) => void
|
||||
setValid: (isValid: boolean) => void
|
||||
}
|
||||
|
||||
export interface EditProfileStore
|
||||
extends EditProfileActions,
|
||||
EditProfileState {}
|
||||
|
||||
export const useProfileStore = create<EditProfileStore>()((set) => ({
|
||||
pending: false,
|
||||
valid: true,
|
||||
|
||||
setIsPending: (isPending) => set(() => ({ pending: isPending })),
|
||||
setValid: (isValid) => set(() => ({ valid: isValid })),
|
||||
}))
|
||||
Reference in New Issue
Block a user