From 9457ac9337223c14af39b7a7a5b74eb5c35863c4 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Thu, 20 Jan 2022 01:55:10 -0500 Subject: [PATCH] Show resolved markets on Admin page; show create & resolve times --- web/pages/admin.tsx | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/web/pages/admin.tsx b/web/pages/admin.tsx index d0346ee1..992d8bee 100644 --- a/web/pages/admin.tsx +++ b/web/pages/admin.tsx @@ -77,7 +77,6 @@ function ContractsTable() { let contracts = useContracts() ?? [] // Sort users by createdTime descending, by default contracts.sort((a, b) => b.createdTime - a.createdTime) - contracts = contracts.filter((contract) => !contract.isResolved) return ( cell, + formatter: (cell) => html(`
${cell}
`), }, { id: 'volume24Hours', - name: '24 hour vol', + name: '24h vol', formatter: (cell) => (cell as number).toFixed(0), }, + { + id: 'createdTime', + name: 'Created time', + formatter: (cell) => + html( + `${dayjs(cell as number).format( + 'MMM D, h:mma' + )}` + ), + }, { id: 'closeTime', name: 'Close time', @@ -112,6 +121,16 @@ function ContractsTable() { )}` ), }, + { + id: 'resolvedTime', + name: 'Resolved time', + formatter: (cell) => + html( + `${dayjs(cell as number).format( + 'MMM D, h:mma' + )}` + ), + }, { id: 'visibility', name: 'Visibility',