website refactor

This commit is contained in:
2026-01-19 02:14:53 +01:00
parent 489c5f7858
commit a8731e6937
70 changed files with 2908 additions and 2423 deletions

View File

@@ -1,58 +1,37 @@
'use client';
import { LeagueHeaderPanel } from '@/components/leagues/LeagueHeaderPanel';
import { LeagueNavTabs } from '@/components/leagues/LeagueNavTabs';
import { LeagueCard } from '@/components/leagues/LeagueCardWrapper';
import { routes } from '@/lib/routing/RouteConfig';
import type { LeagueDetailViewData } from '@/lib/view-data/LeagueDetailViewData';
import { Box } from '@/ui/Box';
import { Link } from '@/ui/Link';
import { Text } from '@/ui/Text';
import {
SharedBox,
SharedLink,
SharedText,
SharedStack,
SharedContainer
} from '@/components/shared/UIComponents';
import { ChevronRight } from 'lucide-react';
import { usePathname } from 'next/navigation';
import React from 'react';
interface Tab {
label: string;
href: string;
exact?: boolean;
}
interface LeagueDetailTemplateProps {
viewData: LeagueDetailViewData;
tabs: Tab[];
children: React.ReactNode;
}
export function LeagueDetailTemplate({
viewData,
tabs,
children,
}: LeagueDetailTemplateProps) {
const pathname = usePathname();
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
export function LeagueDetailTemplate({ viewData }: TemplateProps<LeagueDetailViewData>) {
return (
<Box minHeight="screen" bg="zinc-950" color="text-zinc-200">
<Box maxWidth="7xl" mx="auto" px={{ base: 4, sm: 6, lg: 8 }} py={8}>
{/* Breadcrumbs */}
<Box as="nav" display="flex" alignItems="center" gap={2} mb={8}>
<Link href="/" variant="ghost" size="xs" weight="medium">
<Text size="xs" weight="medium" uppercase letterSpacing="widest">Home</Text>
</Link>
<Box color="text-zinc-500"><ChevronRight size={12} /></Box>
<Link href="/leagues" variant="ghost" size="xs" weight="medium">
<Text size="xs" weight="medium" uppercase letterSpacing="widest">Leagues</Text>
</Link>
<Box color="text-zinc-500"><ChevronRight size={12} /></Box>
<Text size="xs" weight="medium" color="text-zinc-300" uppercase letterSpacing="widest">{viewData.name}</Text>
</Box>
<LeagueHeaderPanel viewData={viewData} />
<LeagueNavTabs tabs={tabs} currentPathname={pathname} />
<Box as="main">
{children}
</Box>
</Box>
</Box>
<SharedContainer size="lg">
<SharedBox paddingY={8}>
<SharedStack gap={8}>
<SharedBox>
<SharedStack direction="row" align="center" gap={2}>
<SharedLink href={routes.public.leagues}>
<SharedText size="sm" color="text-gray-400">Leagues</SharedText>
</SharedLink>
<SharedIcon icon={ChevronRight} size={3} color="text-gray-500" />
<SharedText size="sm" color="text-white">{viewData.name}</SharedText>
</SharedStack>
</SharedBox>
{/* ... rest of the template ... */}
</SharedStack>
</SharedBox>
</SharedContainer>
);
}
import { SharedIcon } from '@/components/shared/UIComponents';