refactor: clean up unused imports and improve file loading logic

This commit is contained in:
grngxd 2025-07-31 12:29:37 +01:00
parent 4f54880400
commit 31a8d62f1d
4 changed files with 105 additions and 67 deletions

View file

@ -1,6 +1,6 @@
/* eslint-disable qwik/jsx-img */
import { component$ } from "@builder.io/qwik";
import { DocumentHead, routeLoader$ } from "@builder.io/qwik-city";
import { DocumentHead } from "@builder.io/qwik-city";
import CallToAction from "~/components/landing/CallToAction";
import Footer from "~/components/landing/Footer";
import Hero from "~/components/landing/Hero";
@ -8,16 +8,6 @@ import Navbar from "~/components/landing/Navbar";
import Stats from "~/components/landing/Stats";
import Testimonials from "~/components/landing/Testimonials";
export const useAuthCheck = routeLoader$(({ cookie, redirect: r, query }) => {
const jwt = cookie.get("jwt");
const set = Boolean(query.get("jwt_set"));
if (jwt && set) {
throw r(302, "/api/auth/login");
}
return {};
});
export default component$(() => {
return (
<>