Skip to content

Commit

Permalink
fix: default value for first access and last access.
Browse files Browse the repository at this point in the history
  • Loading branch information
anfbermudezme committed Sep 8, 2023
1 parent 885f544 commit 4a9f953
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/features/Students/StudentsTable/columns.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,20 @@ const getColumns = props => [
{
Header: 'First Access',
accessor: 'first_access',
Cell: ({ row }) => new Date(row.values.first_access).toUTCString(),
Cell: ({ row }) => (
row.values.first_access
? new Date(row.values.first_access).toUTCString()
: ''
),
},
{
Header: 'Last Access',
accessor: 'last_access',
Cell: ({ row }) => new Date(row.values.last_access).toUTCString(),
Cell: ({ row }) => (
row.values.last_access
? new Date(row.values.last_access).toUTCString()
: ''
),
},
{
Header: 'Grade',
Expand Down

0 comments on commit 4a9f953

Please sign in to comment.