diff --git a/src/components/ManageElioPolicy.tsx b/src/components/ManageElioPolicy.tsx index 962eb16..08a8bb1 100644 --- a/src/components/ManageElioPolicy.tsx +++ b/src/components/ManageElioPolicy.tsx @@ -6,16 +6,14 @@ import type { MultiCliquePolicy } from '@/types/multiCliqueAccount'; import { truncateMiddle } from '@/utils'; import Image from 'next/image'; import { useState } from 'react'; -import ConfirmationModal from './ConfirmationModal'; +import { EmptyPlaceholder } from '.'; import SpendLimitFormModal from './SpendLimitFormModal'; interface IManageElioPolicyProps { - address?: string; policy: MultiCliquePolicy; } const ManageElioPolicy = ({ policy }: IManageElioPolicyProps) => { - const [isConfirmResetVisible, setIsConfirmResetVisible] = useState(false); const [isSpendLimitModalVisible, setIsSpendLimitModalVisible] = useState(false); @@ -63,47 +61,39 @@ const ManageElioPolicy = ({ policy }: IManageElioPolicyProps) => {
Manage ELIO DAO Policy
- <> -
-
-
Asset
-
Type
-
Limit
-
Spending
-
Action
-
- {Array(5) - .fill(null) - ?.map((arg, index) => ( -
-
- Asset {truncateMiddle('abc')} - -
-
Type {index}
-
Limit {index}
-
Spending {index}
-
- -
-
- ))} +
+
+
Asset
+
Limit
+
Spending
+
Action
- + {!policy.contracts?.length && } + {policy.contracts?.map((contract, index) => { + return ( +
+
+ {truncateMiddle(contract.address)} + +
+
{contract.limit.toString()}
+
+ {contract.alreadySpent.toString()} +
+
+ +
+
+ ); + })} +
- Reset Spend Limit
} - visible={isConfirmResetVisible} - onClose={() => setIsConfirmResetVisible(false)} - onConfirm={() => setIsConfirmResetVisible(false)}> - Are you sure you want to reset the spend limit? -