File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { DesktopLayout } from "./components/DesktopLayout";
88import Index from "./pages/Index" ;
99import { UtilPage } from "./pages/UtilPage" ;
1010import NotFound from "./pages/NotFound" ;
11+ import PrivacyRedirect from "./pages/PrivacyRedirect" ;
1112import { isExtension , isTauri } from "@/lib/platform" ;
1213
1314const queryClient = new QueryClient ( ) ;
@@ -18,6 +19,7 @@ const queryClient = new QueryClient();
1819 */
1920const Router = isTauri ( ) || isExtension ( ) ? HashRouter : BrowserRouter ;
2021const AppLayout = isTauri ( ) ? DesktopLayout : Layout ;
22+ const isWeb = ! isTauri ( ) && ! isExtension ( ) ;
2123
2224const App = ( ) => (
2325 < QueryClientProvider client = { queryClient } >
@@ -33,6 +35,8 @@ const App = () => (
3335 < Routes >
3436 < Route element = { < AppLayout /> } >
3537 < Route path = "/" element = { < Index /> } />
38+ { isWeb && < Route path = "/privacy" element = { < PrivacyRedirect /> } /> }
39+ { isWeb && < Route path = "/privacy/" element = { < PrivacyRedirect /> } /> }
3640 < Route path = "/:utilId" element = { < UtilPage /> } />
3741 </ Route >
3842 { /* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */ }
Original file line number Diff line number Diff line change 1+ import { useEffect } from "react" ;
2+
3+ const PrivacyRedirect = ( ) => {
4+ useEffect ( ( ) => {
5+ window . location . replace ( "/privacy/index.html" ) ;
6+ } , [ ] ) ;
7+
8+ return (
9+ < div className = "min-h-screen flex items-center justify-center" >
10+ < p className = "text-sm text-muted-foreground" > Redirecting to privacy policy…</ p >
11+ </ div >
12+ ) ;
13+ } ;
14+
15+ export default PrivacyRedirect ;
You can’t perform that action at this time.
0 commit comments