Skip to content

Commit

Permalink
Set isRead to default
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadiuszbachorski committed Oct 1, 2024
1 parent e5d2b38 commit 23ea0f9
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions modules/notifications/NotificationsTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,26 @@ interface NotificationsTableProps {

export const NotificationsTable = ({
notifications,
}: NotificationsTableProps) => {
return (
<DataTable
columns={columns}
data={notifications}
entityName="notifications"
pageSize={10}
header={({ table }) => (
<div className="ml-auto flex gap-4">
<ShowUnreadOnlySwitch table={table} />
<MarkAllAsReadButton notifications={notifications} />
</div>
)}
>
{(props) => (
<DataTableBasicView {...props}>
{(notification) => <Notification notification={notification} />}
</DataTableBasicView>
)}
</DataTable>
)
}
}: NotificationsTableProps) => (
<DataTable
columns={columns}
data={notifications}
entityName="notifications"
pageSize={10}
header={({ table }) => (
<div className="ml-auto flex gap-4">
<ShowUnreadOnlySwitch table={table} />
<MarkAllAsReadButton notifications={notifications} />
</div>

Check warning on line 54 in modules/notifications/NotificationsTable/index.tsx

View check run for this annotation

Codecov / codecov/patch

modules/notifications/NotificationsTable/index.tsx#L42-L54

Added lines #L42 - L54 were not covered by tests
)}
initialState={{
columnFilters: [{ id: columnIds.isRead, value: false }],
}}

Check warning on line 58 in modules/notifications/NotificationsTable/index.tsx

View check run for this annotation

Codecov / codecov/patch

modules/notifications/NotificationsTable/index.tsx#L56-L58

Added lines #L56 - L58 were not covered by tests
>
{(props) => (
<DataTableBasicView {...props}>
{(notification) => <Notification notification={notification} />}
</DataTableBasicView>

Check warning on line 63 in modules/notifications/NotificationsTable/index.tsx

View check run for this annotation

Codecov / codecov/patch

modules/notifications/NotificationsTable/index.tsx#L60-L63

Added lines #L60 - L63 were not covered by tests
)}
</DataTable>

Check warning on line 65 in modules/notifications/NotificationsTable/index.tsx

View check run for this annotation

Codecov / codecov/patch

modules/notifications/NotificationsTable/index.tsx#L65

Added line #L65 was not covered by tests
)

0 comments on commit 23ea0f9

Please sign in to comment.