Skip to content

Commit

Permalink
Add ambassador referenda count on collectives overview page, #5521 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hyifeng authored Feb 28, 2025
1 parent 4bada65 commit 1f35bf9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function MakeSureLoaded({ children }) {

export function OnlyLowRankMembers({ children }) {
const member = useContextMyCoreMember();
const { rank } = member;
const { rank } = member || {};
// todo: ambassador may have a different rank threshold
if (rank >= 3) {
return null;
Expand All @@ -37,7 +37,7 @@ export function OnlyLowRankMembers({ children }) {

export function OnlyHighRankMembers({ children }) {
const member = useContextMyCoreMember();
const { rank } = member;
const { rank } = member || {};
// todo: ambassador may have a different rank threshold
if (rank < 3) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,30 @@ import SummaryItem from "next-common/components/summary/layout/item";
export default function AllianceOverviewSummary() {
const { summary } = usePageProps();

const { fellowshipReferenda, allianceMotions, allianceAnnouncements } =
summary ?? {};
const {
fellowshipReferenda,
ambassadorReferenda,
allianceMotions,
allianceAnnouncements,
} = summary ?? {};

return (
<SummaryLayout>
<SummaryItem title="Fellowship Referenda">
<ActiveValue
href={"/fellowship"}
tooltip="Active referenda"
tooltip="Active fellowship referenda"
value={fellowshipReferenda?.active || 0}
/>
</SummaryItem>
<SummaryItem title="Ambassador Referenda">
<ActiveValue
href={"/ambassador"}
tooltip="Active ambassador referenda"
value={ambassadorReferenda?.active || 0}
/>
</SummaryItem>

<SummaryItem title="Alliance Motions">
<ActiveValue
href={"/alliance/motions"}
Expand Down

0 comments on commit 1f35bf9

Please sign in to comment.