adding the Download.tsx url

This commit is contained in:
itsamejms
2026-07-16 18:53:13 +01:00
parent 68c393af5e
commit 82ba6200f8
3 changed files with 65 additions and 31 deletions
+2
View File
@@ -5,6 +5,7 @@ import NotFound from "./pages/NotFound";
import Waitlist from "./pages/Waitlist";
import RequestAccountDeletion from "./pages/RequestAccountDeletion";
import FinalizeAccountDeletion from "./pages/FinalizeAccountDeletion";
import Download from "./pages/Download";
import BlogList from "./pages/BlogList";
import BlogPost from "./pages/BlogPost";
import CookieConsent from "./components/ui/CookieConsent";
@@ -21,6 +22,7 @@ const App = () => (
<Route path="/waitlist" element={<Waitlist />} />
<Route path="/forget-me" element={<RequestAccountDeletion />} />
<Route path="/finalize-forget-me" element={<FinalizeAccountDeletion />} />
<Route path="/download" element={<Download />} />
<Route path="/blog" element={<BlogList />} />
<Route path="/blog/:slug" element={<BlogPost />} />
{/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
+32
View File
@@ -0,0 +1,32 @@
import { useEffect } from "react";
const APP_STORE_URL =
"https://apps.apple.com/app/tailtrails-life-unleashed/id6758676111";
const PLAY_STORE_URL =
"https://play.google.com/store/apps/details?id=com.tailtrailsclub.app";
const FALLBACK_URL = "https://tailtrails.club";
const Download: React.FC = () => {
useEffect(() => {
const ua = navigator.userAgent || navigator.vendor || (window as any).opera;
if (/iPad|iPhone|iPod/.test(ua) && !(window as any).MSStream) {
window.location.replace(APP_STORE_URL);
} else if (/android/i.test(ua)) {
window.location.replace(PLAY_STORE_URL);
} else {
window.location.replace(FALLBACK_URL);
}
}, []);
return (
<p className="flex min-h-screen items-center justify-center text-text-secondary">
Redirecting to the app store… If you are not redirected automatically,{" "}
<a href={FALLBACK_URL} className="ml-1 text-brand underline">
click here
</a>
.
</p>
);
};
export default Download;