Adds complete initial codebase for the RJ Bulk Supplies fuel delivery backoffice: - Authentication pages and protected route layouts - Customer, supplier, fuel purchase, and delivery note management - Custom reporting and customer statement sending tools - Full UI component library and Tailwind styling - Server actions, API routes, and PocketBase integration - Development scripts and project configuration updates - Updated README and package metadata
25 lines
571 B
TypeScript
25 lines
571 B
TypeScript
"use client";
|
|
|
|
import { useEffect, useState } from "react";
|
|
import { Toaster } from "sonner";
|
|
|
|
export function Providers({ children }: { children: React.ReactNode }) {
|
|
const [mounted, setMounted] = useState(false);
|
|
useEffect(() => {
|
|
setMounted(true);
|
|
// Restore theme
|
|
const saved = localStorage.getItem("theme");
|
|
if (saved === "dark") {
|
|
document.documentElement.classList.add("dark");
|
|
}
|
|
}, []);
|
|
|
|
return (
|
|
<>
|
|
{children}
|
|
{mounted && (
|
|
<Toaster richColors position="top-right" closeButton />
|
|
)}
|
|
</>
|
|
);
|
|
}
|