add layout and hook
This commit is contained in:
parent
c49eee8fea
commit
21109e4bf9
8 changed files with 161 additions and 25 deletions
14
client-electron/src/hooks/userAuth.ts
Normal file
14
client-electron/src/hooks/userAuth.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { create } from 'zustand'
|
||||
|
||||
interface UserAuth {
|
||||
username: string | undefined
|
||||
email: string | undefined
|
||||
}
|
||||
|
||||
const userAuthStore = create<UserAuth>(() => ({
|
||||
username: undefined,
|
||||
email: undefined
|
||||
}))
|
||||
|
||||
export const getUserName = userAuthStore(state => state.username)
|
||||
export const getUserEmail = userAuthStore(state => state.email)
|
||||
Loading…
Add table
Add a link
Reference in a new issue