mirror of
https://github.com/docmost/docmost.git
synced 2025-11-16 14:01:10 +10:00
fix space translations (#826)
This commit is contained in:
@ -2,6 +2,8 @@ import { IconCheck } from "@tabler/icons-react";
|
||||
import { Group, Select, SelectProps, Text } from "@mantine/core";
|
||||
import React from "react";
|
||||
import { spaceRoleData } from "@/features/space/types/space-role-data.ts";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { IRoleData } from "@/lib/types.ts";
|
||||
|
||||
const iconProps = {
|
||||
stroke: 1.5,
|
||||
@ -38,9 +40,15 @@ export function SpaceMemberRole({
|
||||
defaultRole,
|
||||
label,
|
||||
}: SpaceMemberRoleProps) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Select
|
||||
data={spaceRoleData}
|
||||
data={spaceRoleData.map((role: IRoleData) => ({
|
||||
label: t(role.label),
|
||||
value: role.value,
|
||||
description: t(role.description),
|
||||
}))}
|
||||
defaultValue={defaultRole}
|
||||
label={label}
|
||||
onChange={onSelect}
|
||||
|
||||
Reference in New Issue
Block a user