2024-11-11 20:37:45 +08:00
|
|
|
import { Server } from "http";
|
2024-11-10 22:32:30 +08:00
|
|
|
import { atom } from "jotai";
|
|
|
|
|
2024-11-11 20:37:45 +08:00
|
|
|
// store which page the user is currently on
|
|
|
|
// no actual routing is done here,
|
|
|
|
// full page components are used render the different pages
|
2024-11-10 22:32:30 +08:00
|
|
|
export const routeAtom = atom("index");
|
2024-11-11 20:37:45 +08:00
|
|
|
|
|
|
|
// store the status of connection to backend
|
|
|
|
type ServerConnection = "connected" | "connecting" | "disconnected";
|
|
|
|
export const serverConnectionAtom = atom<ServerConnection>("disconnected");
|
|
|
|
|
|
|
|
// store the url of the backend server
|
|
|
|
export const serverUrlAtom = atom("");
|