8aab968e09
Build & Deploy / Build & Push Docker Image (push) Successful in 1m2s
Test / Type Check (all packages) (push) Failing after 28s
Test / API Unit Tests (push) Has been skipped
Test / Homepage Unit Tests (push) Has been skipped
Test / Storefront Unit Tests (push) Has been skipped
Test / Admin Unit Tests (push) Has been skipped
Test / Dashboard Unit Tests (push) Has been skipped
Test / API Integration Tests (push) Has been skipped
Build & Deploy / Deploy to VPS (push) Successful in 3s
Comprehensive rename of all marketplace references to storefront: - API module: apps/api/src/modules/marketplace/ → storefront/ - Components: MarketplaceHeader → StorefrontHeader, MarketplaceShell → StorefrontShell, MarketplaceFooter → StorefrontFooter - Types: marketplace-homepage.ts → storefront-homepage.ts - Test files: employee-marketplace-* → employee-storefront-* - All source code identifiers, imports, route paths, and strings - Documentation (docs/), CI config (.gitlab-ci.yml), scripts - Dashboard, admin, storefront workspace references - Prisma field names preserved (isListedOnMarketplace, marketplaceRating, marketplaceFunnelEvent) as they map to database schema Validation: - API type-check: 0 errors - Storefront type-check: 0 errors - Dashboard type-check: 0 errors - Full monorepo type-check: only pre-existing admin TS18046
58 lines
1.9 KiB
TypeScript
58 lines
1.9 KiB
TypeScript
'use client'
|
|
|
|
import type { ReactNode } from 'react'
|
|
|
|
import SiteFooter from './SiteFooter'
|
|
import SiteNavbar from './SiteNavbar'
|
|
import {
|
|
getFooterContent,
|
|
localeOptions,
|
|
useStorefrontPreferences,
|
|
} from '@/components/StorefrontShell'
|
|
import { resolveBrowserAppUrl } from '@/lib/appUrls'
|
|
|
|
export default function SitePageLayout({ children }: { children: ReactNode }) {
|
|
const { language, theme, dict, companyName, setLanguage, setTheme } = useStorefrontPreferences()
|
|
const dashboardUrl = resolveBrowserAppUrl(
|
|
process.env.NEXT_PUBLIC_DASHBOARD_URL ?? 'http://localhost:3000/dashboard',
|
|
)
|
|
const footerContent = getFooterContent(language)
|
|
const available = localeOptions.filter((option) => option.value !== language)
|
|
const current = localeOptions.find((option) => option.value === language) ?? localeOptions[0]
|
|
|
|
return (
|
|
<div className="site-page flex min-h-screen flex-col" data-site-page-layout="true">
|
|
<SiteNavbar
|
|
dict={dict}
|
|
theme={theme}
|
|
setTheme={setTheme}
|
|
companyName={companyName}
|
|
dashboardUrl={dashboardUrl}
|
|
currentLanguage={{
|
|
value: current.value,
|
|
flag: current.flag,
|
|
shortLabel: current.value.toUpperCase(),
|
|
}}
|
|
localeOptions={available.map((option) => ({
|
|
value: option.value,
|
|
flag: option.flag,
|
|
shortLabel: option.value.toUpperCase(),
|
|
}))}
|
|
onSelectLanguage={setLanguage}
|
|
/>
|
|
<div className="flex flex-1 flex-col">
|
|
<div className="flex-1">{children}</div>
|
|
<SiteFooter
|
|
primaryItems={footerContent.primary}
|
|
secondaryItems={footerContent.secondary}
|
|
localeLabel={footerContent.localeLabel}
|
|
rightsLabel={footerContent.rightsLabel}
|
|
localeOptions={available}
|
|
currentLocale={current}
|
|
onSelectLanguage={setLanguage}
|
|
/>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|