Skip to content

Commit

Permalink
fix: renterd alerts relative time and column state
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Mar 1, 2024
1 parent ca00b44 commit ee60a08
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/violet-starfishes-swim.md
@@ -0,0 +1,5 @@
---
'renterd': patch
---

Fixed an issue where the alert data fields showed the wrong dates.
5 changes: 5 additions & 0 deletions .changeset/wise-eagles-allow.md
@@ -0,0 +1,5 @@
---
'renterd': patch
---

Fixed an issue where the alert columns were not initially showing.
2 changes: 1 addition & 1 deletion apps/renterd/contexts/alerts/columns.tsx
Expand Up @@ -129,7 +129,7 @@ export const columns: KeysTableColumn[] = [
render: ({ data: { timestamp } }) => {
return (
<Text color="subtle" size="12" ellipsis>
{formatRelative(new Date(), new Date(timestamp))}
{formatRelative(new Date(timestamp), new Date())}
</Text>
)
},
Expand Down
2 changes: 1 addition & 1 deletion apps/renterd/contexts/alerts/data.tsx
Expand Up @@ -370,7 +370,7 @@ function ContractSetChange({
time
</Text>
<Text size="12" ellipsis>
{formatRelative(new Date(), new Date(time))}
{formatRelative(new Date(time), new Date())}
</Text>
</div>
<div className="flex gap-2">
Expand Down
2 changes: 1 addition & 1 deletion apps/renterd/contexts/alerts/index.tsx
Expand Up @@ -130,7 +130,7 @@ function useAlertsMain() {
sortField,
sortDirection,
resetDefaultColumnVisibility,
} = useTableState('renterd/v0/keys', {
} = useTableState('renterd/v0/alerts', {
columns,
columnsDefaultVisible,
sortOptions,
Expand Down

0 comments on commit ee60a08

Please sign in to comment.