Skip to content

Commit 8bdff74

Browse files
committed
chore: release insight route for non-dev environment
1 parent 965e502 commit 8bdff74

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/client/routes/insights.tsx

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createFileRoute, redirect } from '@tanstack/react-router';
1+
import { createFileRoute } from '@tanstack/react-router';
22
import { useTranslation } from '@i18next-toolkit/react';
33
import { CommonWrapper } from '@/components/CommonWrapper';
44
import { routeAuthBeforeLoad } from '@/utils/route';
@@ -12,7 +12,6 @@ import {
1212
} from '@/components/ui/resizable';
1313
import { cn } from '@/utils/style';
1414
import { MetricsSection } from '@/components/insights/MetricsSection';
15-
import { isDev } from '@/utils/env';
1615
import {
1716
Select,
1817
SelectContent,
@@ -31,15 +30,7 @@ import { useEvent } from '@/hooks/useEvent';
3130
import { BreakdownSection } from '@/components/insights/BreakdownSection';
3231

3332
export const Route = createFileRoute('/insights')({
34-
beforeLoad: (opts) => {
35-
if (!isDev) {
36-
throw redirect({
37-
to: '/',
38-
});
39-
}
40-
41-
return routeAuthBeforeLoad?.(opts);
42-
},
33+
beforeLoad: routeAuthBeforeLoad,
4334
component: PageComponent,
4435
});
4536

0 commit comments

Comments
 (0)