Skip to content

Commit

Permalink
feat: make states for page and total
Browse files Browse the repository at this point in the history
  • Loading branch information
KimJoonSeo committed Dec 3, 2023
1 parent 6f22755 commit f4f0985
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const LeagueOption: React.FC<{ image: string; name: string }> = ({
const App: React.FC = () => {
const [date, setDate] = useState<dayjs.Dayjs>(dayjs())
const [league, setLeague] = useState<string>('eng.1')
const [page, setPage] = useState<number>(0)
const [page, setPage] = useState<number>(1)
const [total, setTotal] = useState<number>(26)
const leagueOptions = [
{label: 'Nation', options: [
Expand Down Expand Up @@ -114,7 +114,7 @@ const App: React.FC = () => {
</Row>
</Layout.Content>
<Layout.Footer style={{textAlign: 'center', padding: 0}}>
<Pagination defaultCurrent={0} total={0} pageSize={12}/>
<Pagination defaultCurrent={page} total={total} pageSize={12}/>
</Layout.Footer>
</Layout>
)
Expand Down

0 comments on commit f4f0985

Please sign in to comment.