feat: ship a web app (#218)
* feat(orion): add endpoint for link metadata * refactor: cleanup comments * wip: plumbing for building a web app * setup deployment materials for web app * fix(web): favicon
This commit was merged in pull request #218.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useEffect } from "react";
|
||||
import { HashRouter, Routes, Route, useNavigate } from "react-router-dom";
|
||||
import { Routes, Route, useNavigate } from "react-router-dom";
|
||||
import { RouterShell } from "@/lib/router-shell";
|
||||
import { TooltipProvider } from "@/components/ui/tooltip";
|
||||
import { useAuthStore } from "@/stores/auth-store";
|
||||
import { LoginPage } from "@/features/auth/login-page";
|
||||
@@ -19,6 +20,8 @@ import {
|
||||
TopLevelErrorBoundary,
|
||||
} from "@/components/app-error-boundary";
|
||||
import { SoundEffectsProvider } from "@/lib/sound-effects/sound-effects-provider";
|
||||
import { platform } from "@/lib/platform";
|
||||
import { InAppAutoplayCard } from "@/components/in-app-autoplay-card";
|
||||
|
||||
const queryClient = createQueryClient();
|
||||
|
||||
@@ -53,7 +56,7 @@ function AutoplayNavigationListener() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
return window.electronAutoplay.onNavigate((data) => {
|
||||
return platform.autoplay.onNavigate((data) => {
|
||||
navigate(`/${data.networkId}/${data.streamId}`);
|
||||
});
|
||||
}, [navigate]);
|
||||
@@ -63,8 +66,9 @@ function AutoplayNavigationListener() {
|
||||
|
||||
function AuthenticatedApp() {
|
||||
return (
|
||||
<HashRouter>
|
||||
<RouterShell>
|
||||
<AutoplayNavigationListener />
|
||||
<InAppAutoplayCard />
|
||||
<RouteErrorBoundary>
|
||||
<Routes>
|
||||
<Route path="settings" element={<SettingsPage />} />
|
||||
@@ -80,7 +84,7 @@ function AuthenticatedApp() {
|
||||
</Route>
|
||||
</Routes>
|
||||
</RouteErrorBoundary>
|
||||
</HashRouter>
|
||||
</RouterShell>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user