Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: renterd alerts relative time and column state #525

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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