mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-07-30 18:53:24 +08:00
chore: use dynamic import to avoid page hydrated
This commit is contained in:
@ -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,
|
||||
}));
|
||||
|
Reference in New Issue
Block a user