Improve translation of dashboard and list
This commit is contained in:
@@ -5,6 +5,7 @@ import { Link, useNavigate } from "react-router"
|
||||
import React, { useContext } from "react";
|
||||
import { Button } from "@mui/material";
|
||||
import { FirmContext } from "../../../contexts/FirmContext";
|
||||
import { useTranslation } from "@refinedev/core";
|
||||
|
||||
type ListProps<T extends GridValidRowModel> = {
|
||||
resource: string,
|
||||
@@ -15,6 +16,7 @@ type ListProps<T extends GridValidRowModel> = {
|
||||
|
||||
const List = <T extends GridValidRowModel>(props: ListProps<T>) => {
|
||||
const { resource, columns } = props;
|
||||
const { translate: t } = useTranslation();
|
||||
const { currentFirm } = useContext(FirmContext);
|
||||
const resourceBasePath = `firm/${currentFirm.instance}/${currentFirm.firm}`
|
||||
|
||||
@@ -33,7 +35,7 @@ const List = <T extends GridValidRowModel>(props: ListProps<T>) => {
|
||||
return (
|
||||
<RefineList>
|
||||
<Link to={"create"} >
|
||||
<Button>Create</Button>
|
||||
<Button>{t("buttons.create")}</Button>
|
||||
</Link>
|
||||
<DataGrid
|
||||
{...dataGridProps}
|
||||
|
||||
Reference in New Issue
Block a user