Skip to content

Commit

Permalink
fix(fixing invalid date on users and domains tab): fixing invalid dat…
Browse files Browse the repository at this point in the history
…e on users and domains tab

fixing invalid date on users and domains tab
  • Loading branch information
glespinosa committed Jun 5, 2024
1 parent c2108cc commit a0126ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/accounts/domains/DomainListings.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ export default function DomainListings({
renderCell: (params) => {
return (
<Typography variant="body2">
{dayjs(params.row.createdAt).format('MMM DD, YYYY')}
{!dayjs(params.row.createdAt).isValid()
? ''
: dayjs(params.row.createdAt).format('MMM DD, YYYY')}
</Typography>
);
},
Expand Down
4 changes: 3 additions & 1 deletion src/views/accounts/instances/Users.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ const CustomTable = ({
editable: false,
renderHeader: () => <AccountsTableHead>Last Active</AccountsTableHead>,
renderCell: (params) => {
const date = dayjs(params.row.lastLogin).format('MMM DD, YYYY');
const date = !dayjs(params.row.lastLogin).isValid()
? ''
: dayjs(params.row.lastLogin).format('MMM DD, YYYY');
return (
<Typography variant="body2" color={'text.secondary'}>
{date}
Expand Down

0 comments on commit a0126ad

Please sign in to comment.