pstream is dead; long live pstream
taciturnaxolotl.github.io/pstream-ng/
1import { conf } from "@/setup/config";
2import { useAuthStore } from "@/stores/auth";
3
4export function useBackendUrl(): string | null {
5 const backendUrl = useAuthStore((s) => s.backendUrl);
6 const config = conf();
7 return (
8 backendUrl ??
9 config.BACKEND_URL ??
10 (config.BACKEND_URLS.length > 0 ? config.BACKEND_URLS[0] : null)
11 );
12}