Skip to content

Commit

Permalink
Add organization statistics (real final)
Browse files Browse the repository at this point in the history
  • Loading branch information
sangwon090 committed Apr 25, 2024
1 parent 1ed4ebc commit 943612e
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
'use client'

import { Text } from '@chakra-ui/react'
import { Flex, Heading } from '@chakra-ui/react'
import { Statistics } from '@/app/components/common/Statistics';
import { getOrganization } from '@/utils/api';

export default async () => {
const org = await getOrganization()

return (
<main>
<Text>무슨 내용을 넣어야 좋을까요?</Text>
<Heading size='lg'>숭실대학교의 문제해결 통계</Heading>

<Flex flexWrap='wrap' direction={{ base: 'column', md: 'row' }} gap={4} mt={6}>
<Statistics text="구성원 수 (BOJ)" value={org.bojUserCount} unit='명' diff={1234} />
<Statistics text="구성원 수 (solved.ac)" value={org.userCount} unit='명' />
<Statistics text="푼 문제" value={org.solvedCount} unit='문제' />
<Statistics text="기여한 문제" value={org.voteCount} unit='문제' />
<Statistics text="AC Rating" value={org.rating} />
</Flex>
</main>
);
}

0 comments on commit 943612e

Please sign in to comment.