setup electron app for production

This commit is contained in:
talksik
2026-04-13 10:03:23 -07:00
parent 1579de8c6d
commit 106254ef83
13 changed files with 96 additions and 21 deletions
+2 -4
View File
@@ -8,13 +8,11 @@ import {
} from "react";
import { PusherClient, type ConnectionState } from "./pusher-client";
import { useSessionStore } from "@/stores/session-store";
import { appConfig } from "@/config/env";
const PusherContext = createContext<PusherClient | null>(null);
const PusherStateContext = createContext<ConnectionState>("disconnected");
// TODO: make this configurable per environment
const PUSHER_URL = "wss://pusher.dev.flowy.live/ws";
export function PusherProvider({ children }: { children: ReactNode }) {
const token = useSessionStore((s) => s.token);
const clientRef = useRef<PusherClient | null>(null);
@@ -33,7 +31,7 @@ export function PusherProvider({ children }: { children: ReactNode }) {
}
const client = new PusherClient({
url: PUSHER_URL,
url: appConfig.pusherUrl,
getToken: () => useSessionStore.getState().token,
});