Add Lighting component and integrate with navigation and routing

- Introduced Lighting component
- Updated AppLayout to include Lighting in the child components.
- Added Lighting route to navigation with authentication requirement.
This commit is contained in:
2025-10-02 13:14:13 -04:00
parent ab59921cb3
commit 9f8f0bb990
6 changed files with 254 additions and 4 deletions

20
src/pages/lighting.astro Normal file
View File

@@ -0,0 +1,20 @@
---
import Base from "@/layouts/Base.astro";
import Root from "@/components/AppLayout.jsx";
import { requireAuthHook } from "@/hooks/requireAuthHook";
const user = await requireAuthHook(Astro);
if (!user) {
return Astro.redirect('/login');
}
---
<Base>
<section>
<div class="prose prose-neutral dark:prose-invert">
<Root child="Lighting" user={user} client:only="react" />
</div>
</section>
</Base>