feat: sync login status with dashboard

This commit is contained in:
hamster1963
2024-12-25 14:28:35 +08:00
parent 97da6b43c1
commit 1c3684faaf
3 changed files with 67 additions and 9 deletions
+2
View File
@@ -4,10 +4,12 @@ export interface WebSocketContextType {
lastMessage: { data: string } | null
connected: boolean
messageHistory: { data: string }[]
reconnect: () => void
}
export const WebSocketContext = createContext<WebSocketContextType>({
lastMessage: null,
connected: false,
messageHistory: [],
reconnect: () => {},
})