fix: shortened datetimes and set background color for navbar

This commit is contained in:
2025-08-29 09:36:15 +04:00
parent 19e5ef2a7e
commit 9404091d69
3 changed files with 27 additions and 20 deletions

View File

@ -1,6 +1,7 @@
import { useMemo } from "react";
import { MRT_ColumnDef } from "mantine-react-table";
import { DealSchema } from "@/lib/client";
import { utcDateTimeToLocalString } from "@/utils/datetime";
const useDealsTableColumns = () => {
return useMemo<MRT_ColumnDef<DealSchema>[]>(
@ -19,7 +20,7 @@ const useDealsTableColumns = () => {
header: "Дата создания",
accessorKey: "createdAt",
Cell: ({ row }) =>
new Date(row.original.createdAt).toLocaleString("ru-RU"),
utcDateTimeToLocalString(row.original.createdAt),
enableSorting: true,
sortingFn: (rowA, rowB) =>
new Date(rowB.original.createdAt).getTime() -