ensure some translations

This commit is contained in:
Maxime-J 2023-04-18 14:35:45 +00:00
parent dfae0c150d
commit b3c1eb1437
3 changed files with 5 additions and 2 deletions

View file

@ -6,10 +6,12 @@ import UserDeleteForm from './UserDeleteForm';
import { ROLES } from 'lib/constants';
import useMessages from 'hooks/useMessages';
import SettingsTable from 'components/common/SettingsTable';
import useLocale from 'hooks/useLocale';
export default function UsersTable({ data = [], onDelete }) {
const { formatMessage, labels } = useMessages();
const { user } = useUser();
const { dateLocale } = useLocale();
const columns = [
{ name: 'username', label: formatMessage(labels.username), style: { flex: 1.5 } },
@ -22,6 +24,7 @@ export default function UsersTable({ data = [], onDelete }) {
if (key === 'created') {
return formatDistance(new Date(row.createdAt), new Date(), {
addSuffix: true,
locale: dateLocale,
});
}
if (key === 'role') {