summaryrefslogtreecommitdiff
path: root/components/information
diff options
context:
space:
mode:
Diffstat (limited to 'components/information')
-rw-r--r--components/information/information-client.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/information/information-client.tsx b/components/information/information-client.tsx
index 53350d13..15487638 100644
--- a/components/information/information-client.tsx
+++ b/components/information/information-client.tsx
@@ -66,7 +66,7 @@ export function InformationClient({ initialData = [] }: InformationClientProps)
const [informations, setInformations] = useState<PageInformationWithUpdatedBy[]>(initialData)
const [loading, setLoading] = useState(false)
const [searchQuery, setSearchQuery] = useState("")
- const [sortField, setSortField] = useState<SortField>("createdAt")
+ const [sortField, setSortField] = useState<SortField>("updatedAt")
const [sortDirection, setSortDirection] = useState<SortDirection>("desc")
const [editingInformation, setEditingInformation] = useState<PageInformationWithUpdatedBy | null>(null)
const [isEditDialogOpen, setIsEditDialogOpen] = useState(false)
@@ -121,9 +121,9 @@ export function InformationClient({ initialData = [] }: InformationClientProps)
aValue = a.pagePath
bValue = b.pagePath
break
- case "createdAt":
- aValue = new Date(a.createdAt)
- bValue = new Date(b.createdAt)
+ case "updatedAt":
+ aValue = new Date(a.updatedAt)
+ bValue = new Date(b.updatedAt)
break
default:
return 0
@@ -155,8 +155,8 @@ export function InformationClient({ initialData = [] }: InformationClientProps)
aValue = a.pagePath
bValue = b.pagePath
} else {
- aValue = new Date(a.createdAt)
- bValue = new Date(b.createdAt)
+ aValue = new Date(a.updatedAt)
+ bValue = new Date(b.updatedAt)
}
if (aValue < bValue) {