chore: use dynamic import to avoid page hydrated

This commit is contained in:
Steven
2023-03-22 23:42:59 +08:00
parent ecf981b361
commit fcd5d544ba
5 changed files with 28 additions and 22 deletions

View File

@ -1,8 +1,17 @@
import { User } from "@/types";
import { create } from "zustand";
export const localUser: User = {
const localUser: User = {
id: "local-user",
name: "Local user",
description: "",
avatar: "",
};
interface UserState {
currentUser: User;
}
export const useUserStore = create<UserState>()(() => ({
currentUser: localUser,
}));