55 lines
1.9 KiB
TypeScript
55 lines
1.9 KiB
TypeScript
// First: the static `metadata` below reads a server-only namespace, which the server bootstrap
|
|
// adds to i18n when this module loads, whichever module Next loads first (0055).
|
|
import '../../../bootstrap/bootstrap.server';
|
|
|
|
import { FlexBox } from '@lumina/island/atoms/flex-box';
|
|
import { DesktopHeader, DesktopPageTitle } from '@lumina/market/app/navigation';
|
|
import { RulesTabs } from '@lumina/market/app/screens/(flow)/terms/organisms/rules-tabs';
|
|
import type { Metadata } from 'next';
|
|
import type { ReactNode } from 'react';
|
|
|
|
import { i18n } from '../../../i18n';
|
|
|
|
export const metadata: Metadata = {
|
|
title: i18n.t('rules:meta-title'),
|
|
description: i18n.t('rules:meta-description'),
|
|
};
|
|
|
|
/**
|
|
* «قوانین لومینا» on desktop (G-2r): the 640 column under the header, with back beside the title
|
|
* «قوانین لومینا» and the tab row «قوانین عمومی» · «شرایط اشتراک»; each tab's text sits in a panel.
|
|
* Each tab is its own route with its own loading, so the title and the row stay while one loads;
|
|
* back returns to where the rules were opened. No nav item is active.
|
|
*/
|
|
export default function RulesLayout({ children }: { children: ReactNode }) {
|
|
const t = i18n.getFixedT(null, 'rules');
|
|
|
|
return (
|
|
<FlexBox direction="flex-col" className="min-h-dvh bg-bg-page">
|
|
<DesktopHeader />
|
|
<FlexBox
|
|
tag="main"
|
|
justifyContent="justify-center"
|
|
className="px-8 py-10"
|
|
>
|
|
<FlexBox
|
|
direction="flex-col"
|
|
gap="gap-4"
|
|
className="w-full max-w-content"
|
|
>
|
|
<DesktopPageTitle title={t('title')} />
|
|
<RulesTabs
|
|
layout="desktop"
|
|
labels={{
|
|
label: t('tabs.label'),
|
|
general: t('tabs.general'),
|
|
subscription: t('tabs.subscription'),
|
|
}}
|
|
/>
|
|
{children}
|
|
</FlexBox>
|
|
</FlexBox>
|
|
</FlexBox>
|
|
);
|
|
}
|