36 lines
755 B
TypeScript
36 lines
755 B
TypeScript
import { TableColumnsType } from "antd";
|
|
import { Collection } from "../../../../types/Item";
|
|
import { useTranslation } from "react-i18next";
|
|
export const useColumns = () => {
|
|
const [t] = useTranslation();
|
|
|
|
const columns: TableColumnsType<Collection> = [
|
|
{
|
|
title: t("columns.ID"),
|
|
dataIndex: "id",
|
|
key: "id",
|
|
align: "center",
|
|
},
|
|
{
|
|
title: t("columns.amount"),
|
|
dataIndex: "amount",
|
|
key: "amount",
|
|
align: "center",
|
|
},
|
|
{
|
|
title: t("columns.date"),
|
|
dataIndex: "date",
|
|
key: "date",
|
|
align: "center",
|
|
},
|
|
{
|
|
title: t("columns.description"),
|
|
dataIndex: "description",
|
|
key: "description",
|
|
align: "center",
|
|
},
|
|
];
|
|
|
|
return columns;
|
|
};
|