Skip to content

Commit 72237e6

Browse files
committed
fix: renterd alerts relative time and column state
1 parent ca00b44 commit 72237e6

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

.changeset/violet-starfishes-swim.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'renterd': patch
3+
---
4+
5+
Fixed an issue where the alert data fields showed the wrong dates.

.changeset/wise-eagles-allow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'renterd': patch
3+
---
4+
5+
Fixed an issue where the alert columns were not initially showing.

apps/renterd/contexts/alerts/columns.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export const columns: KeysTableColumn[] = [
129129
render: ({ data: { timestamp } }) => {
130130
return (
131131
<Text color="subtle" size="12" ellipsis>
132-
{formatRelative(new Date(), new Date(timestamp))}
132+
{formatRelative(new Date(timestamp), new Date())}
133133
</Text>
134134
)
135135
},

apps/renterd/contexts/alerts/data.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ function ContractSetChange({
370370
time
371371
</Text>
372372
<Text size="12" ellipsis>
373-
{formatRelative(new Date(), new Date(time))}
373+
{formatRelative(new Date(time), new Date())}
374374
</Text>
375375
</div>
376376
<div className="flex gap-2">

apps/renterd/contexts/alerts/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function useAlertsMain() {
130130
sortField,
131131
sortDirection,
132132
resetDefaultColumnVisibility,
133-
} = useTableState('renterd/v0/keys', {
133+
} = useTableState('renterd/v0/alerts', {
134134
columns,
135135
columnsDefaultVisible,
136136
sortOptions,

0 commit comments

Comments
 (0)