website refactor
This commit is contained in:
22
apps/website/client-wrapper/LeagueRulebookPageClient.tsx
Normal file
22
apps/website/client-wrapper/LeagueRulebookPageClient.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
'use client';
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import { LeagueRulebookTemplate } from '@/templates/LeagueRulebookTemplate';
|
||||
import { type RulebookSection } from '@/components/leagues/RulebookTabs';
|
||||
import type { LeagueRulebookViewData } from '@/lib/view-data/LeagueRulebookViewData';
|
||||
|
||||
interface LeagueRulebookPageClientProps {
|
||||
viewData: LeagueRulebookViewData;
|
||||
}
|
||||
|
||||
export function LeagueRulebookPageClient({ viewData }: LeagueRulebookPageClientProps) {
|
||||
const [activeSection, setActiveSection] = useState<RulebookSection>('scoring');
|
||||
|
||||
return (
|
||||
<LeagueRulebookTemplate
|
||||
viewData={viewData}
|
||||
activeSection={activeSection}
|
||||
onSectionChange={setActiveSection}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user