diff --git a/features/platform-admin/frontend-admin/src/pages/merch/MerchSubmissionsPage.tsx b/features/platform-admin/frontend-admin/src/pages/merch/MerchSubmissionsPage.tsx index 3450047f0..c8b97e27f 100644 --- a/features/platform-admin/frontend-admin/src/pages/merch/MerchSubmissionsPage.tsx +++ b/features/platform-admin/frontend-admin/src/pages/merch/MerchSubmissionsPage.tsx @@ -2,7 +2,9 @@ import { useState } from 'react'; import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { formatDistanceToNow } from 'date-fns'; import styled from 'styled-components'; -import { Button, Select, Badge } from '@lilith/ui-primitives'; +import { Button, Select, Badge, Card } from '@lilith/ui-primitives'; +import { Stack, Grid } from '@lilith/ui-layout'; +import { Heading, Text } from '@lilith/ui-typography'; import type { MerchSubmissionResponseDto, MerchSubmissionsListResponseDto, @@ -71,43 +73,9 @@ const statusLabels: Record = { implemented: 'Implemented', }; -// Styled components -const PageContainer = styled.div` - display: flex; - flex-direction: column; - gap: ${({ theme }) => theme.spacing.lg}; -`; - -const PageHeader = styled.div``; - -const PageTitle = styled.h1` - font-size: ${({ theme }) => theme.typography.fontSize['2xl']}; - font-weight: ${({ theme }) => theme.typography.fontWeight.bold}; - color: ${({ theme }) => theme.colors.text}; - margin: 0; -`; - -const PageSubtitle = styled.p` - font-size: ${({ theme }) => theme.typography.fontSize.sm}; - color: ${({ theme }) => theme.colors.text.muted}; - margin: 0; -`; - -const StatsGrid = styled.div` - display: grid; - grid-template-columns: repeat(2, 1fr); - gap: ${({ theme }) => theme.spacing.md}; - - @media (min-width: 768px) { - grid-template-columns: repeat(4, 1fr); - } -`; - -const StatCard = styled.div<{ $borderColor?: string }>` - background: ${({ theme }) => theme.colors.surface}; - border: 1px solid ${({ theme, $borderColor }) => $borderColor || theme.colors.border}; - border-radius: ${({ theme }) => theme.borderRadius.lg}; - padding: ${({ theme }) => theme.spacing.md}; +// Styled components for stats +const StatCardContent = styled.div` + text-align: center; `; const StatValue = styled.div<{ $color?: string }>` @@ -121,18 +89,7 @@ const StatLabel = styled.div` color: ${({ theme }) => theme.colors.text.muted}; `; -const FilterRow = styled.div` - display: flex; - gap: ${({ theme }) => theme.spacing.sm}; -`; - -const TableCard = styled.div` - background: ${({ theme }) => theme.colors.surface}; - border: 1px solid ${({ theme }) => theme.colors.border}; - border-radius: ${({ theme }) => theme.borderRadius.lg}; - overflow: hidden; -`; - +// Table styled components const Table = styled.table` width: 100%; border-collapse: collapse; @@ -284,42 +241,56 @@ export function MerchSubmissionsPage() { ]; return ( - - - Merch Submissions - Review and manage merch idea submissions - + + {/* Page Header */} +
+ + Merch Submissions + + + Review and manage merch idea submissions + +
+ {/* Stats Grid */} {stats && ( - - - {stats.total} - Total Submissions - - - {stats.byStatus.pending ?? 0} - Pending Review - - - {stats.byStatus.approved ?? 0} - Approved - - - {stats.last7Days} - Last 7 Days - - + + + + {stats.total} + Total Submissions + + + + + {stats.byStatus.pending ?? 0} + Pending Review + + + + + {stats.byStatus.approved ?? 0} + Approved + + + + + {stats.last7Days} + Last 7 Days + + + )} - - setStatusFilter(e.target.value)} + /> - + {/* Table */} + {isLoading ? ( Loading submissions... ) : submissions.length === 0 ? ( @@ -392,8 +363,9 @@ export function MerchSubmissionsPage() { )} - + + {/* Detail Modal */} {selectedSubmission && ( )} -
+ ); }