mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-05-06 05:38:51 +00:00
8c8d3e3057
* feat: add user_template setting * style: header * style: page padding * style: header * feat: header now time * style: login page * feat: nav indicator * style: button inset shadow * style: footer text size * feat: header show login_ip * fix: error toast * fix: frontend_templates setting * fix: lint * feat: pr auto format * chore: auto-fix linting and formatting issues --------- Co-authored-by: hamster1963 <hamster1963@users.noreply.github.com>
17 lines
478 B
TypeScript
17 lines
478 B
TypeScript
import { MainStore } from "@/types"
|
|
import { create } from "zustand"
|
|
import { createJSONStorage, persist } from "zustand/middleware"
|
|
|
|
export const useMainStore = create<MainStore, [["zustand/persist", MainStore]]>(
|
|
persist(
|
|
(set, get) => ({
|
|
profile: get()?.profile,
|
|
setProfile: (profile) => set({ profile }),
|
|
}),
|
|
{
|
|
name: "mainStore",
|
|
storage: createJSONStorage(() => localStorage),
|
|
},
|
|
),
|
|
)
|