Skip to content

Commit

Permalink
refactor: added data column
Browse files Browse the repository at this point in the history
  • Loading branch information
BiswaViraj committed Aug 3, 2023
1 parent 86b8597 commit e5cb97c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions apps/web/src/pages/subscribers/SubscribersListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,26 @@ const columns: IExtendedColumn<ISubscriber>[] = [
Header: 'Created At',
Cell: withCellLoading(({ row: { original } }) => format(new Date(original.createdAt), 'dd.MM.yyyy')),
},
{
accessor: 'data',
Header: 'Data',
Cell: withCellLoading(({ row: { original } }) =>
original.data ? (
<HoverCard width={200} position="bottom" shadow="md" withArrow arrowSize={3.5}>
<HoverCard.Target>
<Button>
<ViewportWide />
</Button>
</HoverCard.Target>
<HoverCard.Dropdown>
<Code>{JSON.stringify(original.data, null, 2)}</Code>
</HoverCard.Dropdown>
</HoverCard>
) : (
''
)
),
},
];

function SubscribersList() {
Expand Down

0 comments on commit e5cb97c

Please sign in to comment.