Skip to content

Commit

Permalink
fix: Changes on certificate date ordering and filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
dogukanoksuz committed Oct 30, 2023
1 parent 22498fe commit a6af7e9
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions src/pages/settings/advanced/certificates/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useTranslation } from "react-i18next"

import { ICertificate } from "@/types/certificate"
import { DivergentColumn } from "@/types/table"
import { compareNumericString } from "@/lib/utils"
import { useEmitter } from "@/hooks/useEmitter"
import { Button } from "@/components/ui/button"
import DataTable from "@/components/ui/data-table/data-table"
Expand Down Expand Up @@ -48,22 +49,15 @@ const AdvancedCertificateSettingsPage: NextPageWithLayout = () => {
/>
),
title: t("advanced.certificates.updated_at"),
cell: ({ row }) => (
<>
{row.original.updated_at
? new Date(row.original.updated_at).toLocaleDateString(
i18n.language,
{
day: "2-digit",
month: "long",
year: "numeric",
hour: "2-digit",
minute: "2-digit",
}
)
: t("unknown")}
</>
),
accessorFn: (row) =>
new Date(row.updated_at).toLocaleDateString(i18n.language, {
day: "2-digit",
month: "long",
year: "numeric",
hour: "2-digit",
minute: "2-digit",
}),
sortingFn: compareNumericString,
},
{
id: "actions",
Expand Down

0 comments on commit a6af7e9

Please sign in to comment.