Skip to content

Commit ea56878

Browse files
committed
Remove the mobile check
1 parent df92242 commit ea56878

3 files changed

Lines changed: 5 additions & 25 deletions

File tree

pnpm-workspace.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
allowBuilds:
2+
better-sqlite3: true
3+
esbuild: true
4+
sharp: true
5+
workerd: true

src/routes/__root.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
ClientOnly,
66
createRootRouteWithContext,
77
HeadContent,
8-
redirect,
98
ScriptOnce,
109
Scripts,
1110
} from "@tanstack/react-router";
@@ -17,7 +16,6 @@ import { Button } from "@/components/ui/button";
1716
import { Card, CardContent, CardHeader } from "@/components/ui/card";
1817
import { Toaster } from "@/components/ui/sonner";
1918
import { client, idbName } from "@/db";
20-
import { getIsMobile } from "@/server/functions/getIsMobile";
2119
import { seo } from "@/utils/seo";
2220
import appCss from "../styles.css?url";
2321

@@ -26,20 +24,6 @@ interface MyRouterContext {
2624
}
2725

2826
export const Route = createRootRouteWithContext<MyRouterContext>()({
29-
beforeLoad: async ({ location }) => {
30-
// Skip redirect if already on /mobile to avoid infinite loop
31-
if (location.pathname === "/mobile") {
32-
return;
33-
}
34-
35-
const isMobile = await getIsMobile();
36-
37-
if (isMobile) {
38-
throw redirect({
39-
to: "/mobile",
40-
});
41-
}
42-
},
4327
head: () => ({
4428
meta: [
4529
{

src/server/functions/getIsMobile.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)