diff --git a/src/components/ClubEventList.tsx b/src/components/ClubEventList.tsx index ea8865e..d5fa2ed 100644 --- a/src/components/ClubEventList.tsx +++ b/src/components/ClubEventList.tsx @@ -51,7 +51,7 @@ export const ClubEvenList = (props: Props) => { return () => clearTimeout(id); }, [props.clubId]); const handleAddToCalendar = useCallback(() => { - const url = `${window.location.origin}/api/club/${props.clubId}/calendar.ics?page=${page}`; + const url = `${window.location.origin}/api/club/${props.clubId}/calendar.ics`; const uri = url.replace(/^http(s)?/, 'webcal'); console.debug(uri); window.open(uri); @@ -72,7 +72,7 @@ export const ClubEvenList = (props: Props) => { icon={} onClick={handleAddToCalendar} > - 本页全部添加到日历 + 订阅该俱乐部比赛 {showAll ? ( { navigate(`/event/${e.matchId}`); }, [e]); - const handleAddCalendar = useCallback(() => { - const url = `${window.location.origin}/calendar/event/${e.matchId}/events.ics`; - const uri = url.replace(/^http(s)?/, 'webcal'); - window.open(uri); + const messageFormat = useMemo(() => { + if (e.isFinished) { + return `已结束 DD 天`; + } + if (e.isProcessing) { + return '比赛进行中'; + } + return `还有 DD 天 HH 时开始`; }, [e]); return ( } - onClick={handleAddCalendar} - > - 加入日历 - ,