c5f614b3e4
Build & Deploy / Build & Push Docker Image (push) Failing after 41s
Build & Deploy / Deploy to VPS (push) Has been skipped
Test / API Unit Tests (push) Failing after 5m1s
Test / Marketplace Unit Tests (push) Successful in 9m36s
Test / Admin Unit Tests (push) Successful in 9m38s
Test / Dashboard Unit Tests (push) Successful in 9m37s
Test / API Integration Tests (push) Has been cancelled
- Signup sends verification email instead of auto-login; login blocks unverified emails - New endpoints: POST /verify-email and POST /resend-verification - New verify-email page in dashboard with token-based email confirmation - DB migration adds emailVerified and emailVerificationToken fields to Employee - Update sign-in/sign-up/reset-password flows to handle verification states - Minor UI polish across dashboard and marketplace components - Refactor marketplace-homepage types
42 lines
1.8 KiB
TypeScript
42 lines
1.8 KiB
TypeScript
import type { Metadata } from 'next'
|
|
import { cookies } from 'next/headers'
|
|
import MarketplaceShell from '@/components/MarketplaceShell'
|
|
import { getMarketplaceLanguage } from '@/lib/i18n.server'
|
|
import './globals.css'
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'FleetOS Marketplace',
|
|
description: 'Discover vehicles from trusted rental companies.',
|
|
icons: {
|
|
icon: '/rentalcardrive.png',
|
|
shortcut: '/favicon.ico',
|
|
apple: '/rentalcardrive.png',
|
|
},
|
|
}
|
|
|
|
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
|
const language = await getMarketplaceLanguage()
|
|
const cookieStore = await cookies()
|
|
const rawTheme =
|
|
cookieStore.get('rentaldrivego-theme')?.value ??
|
|
cookieStore.get('marketplace-theme')?.value
|
|
const theme = rawTheme === 'dark' ? 'dark' : 'light'
|
|
|
|
return (
|
|
<html lang={language} dir={language === 'ar' ? 'rtl' : 'ltr'} suppressHydrationWarning>
|
|
<head>
|
|
{/* Runs before hydration to prevent flash of wrong theme */}
|
|
<script
|
|
dangerouslySetInnerHTML={{
|
|
__html:
|
|
"(function(){try{var m=document.cookie.match(/(?:^|; )rentaldrivego-theme=([^;]+)/);var theme=m?decodeURIComponent(m[1]):(localStorage.getItem('rentaldrivego-theme')||localStorage.getItem('marketplace-theme'));if(theme!=='light'&&theme!=='dark'){theme=window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'}document.documentElement.classList.toggle('dark',theme==='dark');document.documentElement.style.colorScheme=theme;document.body&&document.body.setAttribute('data-theme',theme)}catch(e){}})();",
|
|
}}
|
|
/>
|
|
</head>
|
|
<body suppressHydrationWarning>
|
|
<MarketplaceShell initialLanguage={language} initialTheme={theme}>{children}</MarketplaceShell>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|