import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import {
Outlet,
Link,
createRootRouteWithContext,
useRouter,
HeadContent,
Scripts,
} from "@tanstack/react-router";
import { useEffect, useState, type ReactNode } from "react";
import { Menu, X, Phone } from "lucide-react";
import appCss from "../styles.css?url";
import { reportLovableError } from "../lib/lovable-error-reporting";
const NAV = [
{ to: "/", label: "Home" },
{ to: "/about", label: "About" },
{ to: "/applications", label: "Applications" },
{ to: "/products", label: "Products" },
{ to: "/solutions", label: "Solutions" },
{ to: "/projects", label: "Projects" },
{ to: "/enquiry", label: "Enquiry" },
{ to: "/contact", label: "Contact" },
{ to: "/rental", label: "Rental" },
] as const;
function TopBar() {
return (
);
}
function Header() {
const [open, setOpen] = useState(false);
return (
Pro
mist
Misting Systems
{open && (
{NAV.map((n) => (
setOpen(false)}
className="text-foreground/80 hover:text-brand-red"
activeProps={{ className: "text-brand-red" }}
activeOptions={{ exact: n.to === "/" }}
>
{n.label}
))}
)}
);
}
function Footer() {
return (
);
}
function NotFoundComponent() {
return (
404
Page not found
The page you're looking for doesn't exist or has been moved.
Go home
);
}
function ErrorComponent({ error, reset }: { error: Error; reset: () => void }) {
console.error(error);
const router = useRouter();
useEffect(() => {
reportLovableError(error, { boundary: "tanstack_root_error_component" });
}, [error]);
return (
This page didn't load
Something went wrong. Try again or head home.
Go home
);
}
export const Route = createRootRouteWithContext<{ queryClient: QueryClient }>()({
head: () => ({
meta: [
{ charSet: "utf-8" },
{ name: "viewport", content: "width=device-width, initial-scale=1" },
{ title: "Promist Misting Systems — Humidity and Control" },
{ name: "description", content: "High-pressure misting systems for outdoor cooling, humidification, dust suppression and sanitization in the UAE since 1979." },
{ property: "og:title", content: "Promist Misting Systems" },
{ property: "og:description", content: "High-pressure misting for cooling, humidification and dust suppression." },
{ property: "og:type", content: "website" },
{ name: "twitter:card", content: "summary_large_image" },
],
links: [
{ rel: "stylesheet", href: appCss },
{ rel: "icon", href: "/favicon.ico", type: "image/x-icon" },
{ rel: "preconnect", href: "https://fonts.googleapis.com" },
{ rel: "preconnect", href: "https://fonts.gstatic.com", crossOrigin: "anonymous" },
{ rel: "stylesheet", href: "https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@300;400;500;600;700;800;900&display=swap" },
],
}),
shellComponent: RootShell,
component: RootComponent,
notFoundComponent: NotFoundComponent,
errorComponent: ErrorComponent,
});
function RootShell({ children }: { children: ReactNode }) {
return (
{children}
);
}
function RootComponent() {
const { queryClient } = Route.useRouteContext();
return (
);
}