diff --git a/frontend/src/components/CampaignCard/index.tsx b/frontend/src/components/CampaignCard/index.tsx index 813398d0..f22e38e7 100644 --- a/frontend/src/components/CampaignCard/index.tsx +++ b/frontend/src/components/CampaignCard/index.tsx @@ -81,13 +81,15 @@ const CampaignCard = ({ /> ); + const linkComponent = isAdmin ? ( + {content} + ) : ( + {content} + ); + return ( <> - {campaignId === undefined ? ( - content - ) : ( - {content} - )} + {campaignId === undefined ? content : linkComponent} {popup} ); diff --git a/frontend/src/pages/admin/AdminContent/AdminCampaignContent.tsx b/frontend/src/pages/admin/AdminContent/AdminCampaignContent.tsx index 05f28ee7..e5ca4208 100644 --- a/frontend/src/pages/admin/AdminContent/AdminCampaignContent.tsx +++ b/frontend/src/pages/admin/AdminContent/AdminCampaignContent.tsx @@ -13,7 +13,7 @@ type Props = { }; const AdminCampaignContent = ({ campaigns, setCampaigns, orgLogo }: Props) => ( -
+
{campaigns.map((c) => ( { if (orgLogo === undefined) { // have to be consistent in returning a function to make eslint happy - return () => { }; + return () => {}; } const reader = new FileReader(); @@ -185,6 +189,15 @@ const AdminContent = ({ > + + {/* have to add addition button here to create campaigns, + or maybe it should go in a more obvious spot? */}
- - {windowSelected === "campaigns" && ( - - )} - {windowSelected === "members" && ( + {windowSelected === "campaigns" && ( + + )} + {windowSelected === "members" && ( + - )} - + + )} { questionsSend ); await setCampaignCoverImage(campaignId, cover); + navigate("/admin"); } catch (err) { if (err instanceof FetchError) { try { diff --git a/frontend/src/pages/dashboard/CampaignGrid/index.tsx b/frontend/src/pages/dashboard/CampaignGrid/index.tsx index 8cb322d5..c604bd1d 100644 --- a/frontend/src/pages/dashboard/CampaignGrid/index.tsx +++ b/frontend/src/pages/dashboard/CampaignGrid/index.tsx @@ -79,7 +79,7 @@ const CampaignGrid = ({ /> ))} -
+ ); };