add layout and hook

This commit is contained in:
Kenta420 2024-01-16 18:08:55 +07:00
parent c49eee8fea
commit 21109e4bf9
8 changed files with 161 additions and 25 deletions

View 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)