Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Disable redirects

Blue Mouse521ebcc17ded
diff --git a/web/app/routes/blog.$category.$slug.tsx b/web/app/routes/blog.$category.$slug.tsx
index 8cd94894c..2cfe94e12 100644
--- a/web/app/routes/blog.$category.$slug.tsx
+++ b/web/app/routes/blog.$category.$slug.tsx
@@ -48,9 +48,6 @@ export const meta: MetaFunction = (loaderData: any) => {
}
export const loader: LoaderFunction = async ({ params }) => {
- return redirect('/dashboard', 302)
-
- // eslint-disable-next-line no-unreachable
if (isSelfhosted) {
return redirect('/dashboard', 302)
}
@@ -63,7 +60,6 @@ export const loader: LoaderFunction = async ({ params }) => {
})
}
- // @ts-expect-error
const post = await getPost(slug, category)
if (!post) {
diff --git a/web/app/routes/blog.$slug.tsx b/web/app/routes/blog.$slug.tsx
index 086d7dcb2..0407b509e 100644
--- a/web/app/routes/blog.$slug.tsx
+++ b/web/app/routes/blog.$slug.tsx
@@ -79,9 +79,6 @@ export const sitemap: SitemapFunction = async () => {
}
export const loader: LoaderFunction = async ({ params }) => {
- return redirect('/dashboard', 302)
-
- // eslint-disable-next-line no-unreachable
if (isSelfhosted) {
return redirect('/dashboard', 302)
}
@@ -92,7 +89,6 @@ export const loader: LoaderFunction = async ({ params }) => {
})
}
- // @ts-expect-error
const post = await getPost(params.slug)
if (!post) {
diff --git a/web/app/routes/blog.tsx b/web/app/routes/blog.tsx
index 473f582b3..a3a517684 100644
--- a/web/app/routes/blog.tsx
+++ b/web/app/routes/blog.tsx
@@ -8,9 +8,6 @@ import { isSelfhosted, TITLE_SUFFIX } from '~/lib/constants'
import { getBlogPosts } from '~/api'
export const loader: LoaderFunction = async () => {
- return redirect('/dashboard', 302)
-
- // eslint-disable-next-line no-unreachable
if (isSelfhosted) {
return redirect('/dashboard', 302)
}
@@ -23,7 +20,6 @@ export const loader: LoaderFunction = async () => {
console.error(error)
})
- // eslint-disable-next-line no-unreachable
if (!data || _isEmpty(data)) {
return null
}
diff --git a/web/app/routes/index.tsx b/web/app/routes/index.tsx
index 1b4719fa5..d1772e261 100644
--- a/web/app/routes/index.tsx
+++ b/web/app/routes/index.tsx
@@ -48,9 +48,6 @@ export const sitemap: SitemapFunction = () => ({
})
export async function loader({ request }: LoaderFunctionArgs) {
- return redirect('/dashboard', 302)
-
- // eslint-disable-next-line no-unreachable
if (isSelfhosted) {
return redirect('/login', 302)
}
@@ -69,7 +66,6 @@ export async function loader({ request }: LoaderFunctionArgs) {
}
if (userAgent) {
- // @ts-expect-error
const parser = new UAParser(userAgent)
deviceInfo = {