Disable home page in React app

This commit is contained in:
2025-10-07 23:48:29 +03:00
Unverified
parent 142bdeafee
commit eebe548d88
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ export default function App() {
<ElectronTitleBar /> <ElectronTitleBar />
<div id="main-wrapper"> <div id="main-wrapper">
<Routes> <Routes>
<Route path="/" element={<HomePage />} /> z<Route path="/" element={<HomePage />} />
<Route path="/login" element={<LoginPage />} /> <Route path="/login" element={<LoginPage />} />
<Route path="/register" element={<RegisterPage />} /> <Route path="/register" element={<RegisterPage />} />
<Route path="/download-app" element={<DownloadAppPage />} /> <Route path="/download-app" element={<DownloadAppPage />} />
+7 -2
View File
@@ -1,5 +1,6 @@
import { useNavigate } from "react-router-dom"; import { Navigate, useNavigate } from "react-router-dom";
import { useAppState } from "./app/ui/state"; import { useAppState } from "./app/ui/state";
import { isElectron } from "./app/electron/electron";
function GitHubLink({ children }: { children: React.ReactNode }) { function GitHubLink({ children }: { children: React.ReactNode }) {
return ( return (
@@ -23,7 +24,11 @@ export default function HomePage() {
} else { } else {
navigate("/login"); navigate("/login");
} }
}; }
if (isElectron) {
return <Navigate to="/chat" />;
}
return ( return (
<div className="homepage"> <div className="homepage">