diff --git a/src/pages/Admin/Charity/Dashboard/Figure.tsx b/src/pages/Admin/Charity/Dashboard/Figure.tsx index 26dca5bfbe..ac7d2cc33a 100644 --- a/src/pages/Admin/Charity/Dashboard/Figure.tsx +++ b/src/pages/Admin/Charity/Dashboard/Figure.tsx @@ -30,7 +30,7 @@ export default function Figure(props: Props) { {props.icon} -

{props.amount}

+

{props.amount}

{props.actions} ); diff --git a/src/pages/Admin/Charity/Dashboard/Movements.tsx b/src/pages/Admin/Charity/Dashboard/Movements.tsx index 1aea4ac08d..057e141959 100644 --- a/src/pages/Admin/Charity/Dashboard/Movements.tsx +++ b/src/pages/Admin/Charity/Dashboard/Movements.tsx @@ -13,28 +13,28 @@ const asset: { [K in Flow]: { icon: ReactNode; source: string; - title: string; + title: ReactNode; }; } = { "liq-cash": { - title: "Grant", + title: Grant, icon: , source: "Savings", }, "lock-cash": { - title: "Grant", + title: Grant, icon: , - source: "Investment", + source: "Investments", }, "liq-lock": { - title: "Invest", - icon: , + title: Invest, + icon: , source: "Savings", }, "lock-liq": { - title: "Save", - icon: , - source: "Investment", + title: Save, + icon: , + source: "Investments", }, }; @@ -48,6 +48,7 @@ interface Props { export function Movements({ classes = "", ...props }: Props) { const { showModal } = useModalContext(); const movs = Object.entries(props.mov).filter(([_, v]) => v > 0); + if (movs.length === 0) return null; return ( @@ -55,7 +56,7 @@ export function Movements({ classes = "", ...props }: Props) {

Pending transactions

-
+
{movs.map((entry) => { const [k, v] = entry as [Flow, number]; const a = asset[k]; @@ -65,10 +66,10 @@ export function Movements({ classes = "", ...props }: Props) { className="grid gap-x-2 grid-cols-subgrid col-span-full items-center" > {a.icon} - {a.title} - - $ {humanize(v)} from:{a.source} - + {a.title} + $ {humanize(v)} + from + {a.source} diff --git a/src/pages/Admin/Charity/Dashboard/Schedule/Schedule.tsx b/src/pages/Admin/Charity/Dashboard/Schedule/Schedule.tsx index 2dc58441ba..c64b20a264 100644 --- a/src/pages/Admin/Charity/Dashboard/Schedule/Schedule.tsx +++ b/src/pages/Admin/Charity/Dashboard/Schedule/Schedule.tsx @@ -151,7 +151,9 @@ function Row(props: IRow) { {props.pct ?? 50} % $ - {humanize(val)} + + {humanize(val)} + {props.tooltip?.(val)}
);