diff --git a/frontend/src/Settings/Languages/table.tsx b/frontend/src/Settings/Languages/table.tsx index 81fb6e78d..8c70608f3 100644 --- a/frontend/src/Settings/Languages/table.tsx +++ b/frontend/src/Settings/Languages/table.tsx @@ -8,7 +8,7 @@ import React, { } from "react"; import { Badge, Button, ButtonGroup } from "react-bootstrap"; import { Column, TableUpdater } from "react-table"; -import { useProfiles } from "."; +import { useEnabledLanguages, useProfiles } from "."; import { ActionButton, SimpleTable, useShowModal } from "../../components"; import { useSingleUpdate } from "../components"; import { languageProfileKey } from "../keys"; @@ -18,6 +18,8 @@ import { anyCutoff } from "./options"; const Table: FunctionComponent = () => { const originalProfiles = useProfiles(); + const languages = useEnabledLanguages(); + const [profiles, setProfiles] = useState(() => cloneDeep(originalProfiles)); const nextProfileId = useMemo( @@ -117,6 +119,8 @@ const Table: FunctionComponent = () => { [] ); + const canAdd = languages.length !== 0; + return ( { >