File tree Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Original file line number Diff line number Diff line change 1- import { Title } from '@mantine/core' ;
1+ import { prisma } from '@/lib/db' ;
2+ import {
3+ Card ,
4+ Center ,
5+ Group ,
6+ SimpleGrid ,
7+ Stack ,
8+ Text ,
9+ Title ,
10+ } from '@mantine/core' ;
11+ import { IconAccessPoint } from '@tabler/icons-react' ;
212
313export default async function DashboardPage ( ) {
14+ const liveStreams = await prisma . stream . count ( { where : { state : 'Live' } } ) ;
15+
416 return (
5- < >
17+ < Stack >
618 < Title order = { 1 } > Hello!</ Title >
7- </ >
19+
20+ < SimpleGrid cols = { { base : 1 , sm : 2 , lg : 4 } } spacing = "xl" >
21+ < Card shadow = "sm" withBorder >
22+ < Group >
23+ < Center >
24+ < IconAccessPoint size = { 40 } color = "red" />
25+ </ Center >
26+
27+ < Title order = { 2 } > Live streams: { liveStreams } </ Title >
28+ </ Group >
29+ </ Card >
30+ </ SimpleGrid >
31+ </ Stack >
832 ) ;
933}
You can’t perform that action at this time.
0 commit comments