Skip to content

Commit

Permalink
[Fix] Fix permit holders not rendering if no recent permit (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
OustanDing committed Aug 17, 2022
1 parent f42ed06 commit 155cb86
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pages/admin/permit-holders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,12 @@ const PermitHolders: NextPage = () => {
Header: 'Recent APP',
accessor: 'mostRecentPermit',
disableSortBy: true,
Cell: ({ value: { expiryDate, rcdPermitId } }) => {
Cell: ({ value }) => {
if (!value) {
return 'N/A';
}

const { expiryDate, rcdPermitId } = value;
const permitStatus = getPermitExpiryStatus(new Date(expiryDate));
return (
<Flex>
Expand Down

0 comments on commit 155cb86

Please sign in to comment.