feat(club-event-list): add refresh button for event list Introduces a new refresh button located in the pagination control section. This button allows users to manually trigger a reload of the club events. It uses the SyncOutlined icon and is linked to the requestEvents API. The button also displays a loading state while the refresh is in progress.

This commit is contained in:
kyuuseiryuu 2026-03-26 13:54:34 +09:00
parent 5927861af7
commit f16f97b4c8

View File

@ -3,7 +3,7 @@ import type { IEventInfo } from "../types";
import { useCallback, useEffect, useMemo, useState } from "react";
import { EventCard } from "./EventCard";
import { useRequest } from "ahooks";
import { CalendarOutlined } from "@ant-design/icons";
import { CalendarOutlined, SyncOutlined } from "@ant-design/icons";
interface Props {
clubId: string;
@ -69,6 +69,14 @@ export const ClubEvenList = (props: Props) => {
<Divider>
{paginationControlVisible ? (
<Space>
<Button
loading={requestEvents.loading}
type="link"
onClick={requestEvents.refreshAsync}
icon={<SyncOutlined />}
>
</Button>
<Typography.Text type="secondary"></Typography.Text>
<Switch checked={showFinishedEvents} onChange={() => setShowFinishedEvents(!showFinishedEvents)} unCheckedChildren="隐藏" checkedChildren="显示" />
</Space>