From 1b01cff7d7bad1060c1842cb003d4e4ffd5e6a48 Mon Sep 17 00:00:00 2001 From: kyuuseiryuu Date: Mon, 16 Mar 2026 13:46:49 +0900 Subject: [PATCH] refactor: extract club header logic into ClubSummary component and simplify ClubEventsPage - Moved header logic (background, avatar, title, notice button) from ClubEventsPage into a new ClubSummary component. - Updated ClubEventsPage to use ClubSummary instead of managing layout and state directly. - Fixed `onClick` handler in ClubSummary to correctly spread the `info.geo` object when passing to `openWebMapRaw`. - Removed unused imports and state from ClubEventsPage. --- src/components/ClubSummary.tsx | 4 +++- src/page/ClubEvents.tsx | 19 +++---------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/components/ClubSummary.tsx b/src/components/ClubSummary.tsx index 0547bd1..030afc8 100644 --- a/src/components/ClubSummary.tsx +++ b/src/components/ClubSummary.tsx @@ -62,7 +62,9 @@ export const ClubSummary = (props: Props) => { trigger={['click']} menu={{ items: mapMenu, - onClick: (e) => openWebMapRaw(e.key as MapType, info.geo!), + onClick: (e) => openWebMapRaw(e.key as MapType, { + ...info.geo!, + }), }} > + - setIsArticleOpen(false)} placement="bottom"> -
- {info.article} -
-
); } \ No newline at end of file