mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-23 03:25:07 +03:00
Set up basic project structure
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { create } from "zustand";
|
||||
|
||||
type Page = "login" | "register" | "chat"
|
||||
|
||||
interface AppState {
|
||||
currentPage: Page;
|
||||
setCurrentPage: (page: Page) => void;
|
||||
}
|
||||
|
||||
export const useAppState = create<AppState>((set) => ({
|
||||
currentPage: "login", // default page
|
||||
setCurrentPage: (page: Page) => set({ currentPage: page })
|
||||
}));
|
||||
Reference in New Issue
Block a user