Revert "feat: migrate frontend to Astro SSG with design system"

This reverts commit 8ad888da28.
This commit is contained in:
asepharyana
2026-07-02 03:54:44 +07:00
parent 880c68fbab
commit bf86fcda8e
110 changed files with 4980 additions and 3396 deletions
+2 -42
View File
@@ -6,9 +6,9 @@ import type {
VoiceRecordingUploadData,
} from "@bete/shared";
import { useCallback, useEffect, useRef, useState } from "react";
import { getSessionToken } from "../api/client.js";
import type { MediaState } from "../../entities/media/types.js";
import { createLogger } from "../lib/logger.js";
import type { MediaState } from "../types/media.js";
import { getSessionToken } from "../api/client.js";
import type { ActiveSpeakerData } from "./events.js";
const logger = createLogger("socket");
@@ -391,43 +391,3 @@ export function useDashboardSocket(handlers: WsHandlers) {
return { status, send, socketRef: { current: _wsInstance } };
}
/**
* Singleton manager for the WebSocket connection.
* Provides imperative connect/disconnect/send access alongside useDashboardSocket.
*/
export class SocketManager {
private static _instance: SocketManager;
private constructor() {}
static getInstance(): SocketManager {
if (!SocketManager._instance) {
SocketManager._instance = new SocketManager();
}
return SocketManager._instance;
}
/** Ensure the WebSocket is connected (reconnects if closed). */
connect(): void {
_closed = false;
ensureConnected();
}
/** Close the WebSocket and stop reconnection. */
disconnect(): void {
_closed = true;
if (_reconnectTimer) clearTimeout(_reconnectTimer);
if (_wsInstance) {
_wsInstance.close();
_wsInstance = null;
}
}
/** Send data through the WebSocket (no-op if not connected). */
send(data: ArrayBuffer | string): void {
if (_wsInstance?.readyState === WebSocket.OPEN) {
_wsInstance.send(data);
}
}
}