import { observer } from "mobx-react"; import { BeakerIcon } from "outline-icons"; import * as React from "react"; import { Trans, useTranslation } from "react-i18next"; import { TeamPreference } from "@shared/types"; import Badge from "~/components/Badge"; import Flex from "~/components/Flex"; import Heading from "~/components/Heading"; import Scene from "~/components/Scene"; import Switch from "~/components/Switch"; import Text from "~/components/Text"; import useCurrentTeam from "~/hooks/useCurrentTeam"; import useStores from "~/hooks/useStores"; import useToasts from "~/hooks/useToasts"; import SettingRow from "./components/SettingRow"; function Features() { const { auth } = useStores(); const team = useCurrentTeam(); const { t } = useTranslation(); const { showToast } = useToasts(); const handlePreferenceChange = async ( ev: React.ChangeEvent ) => { const preferences = { ...team.preferences, [ev.target.name]: ev.target.checked, }; await auth.updateTeam({ preferences }); showToast(t("Settings saved"), { type: "success", }); }; return ( }> {t("Features")} Manage optional and beta features. Changing these settings will affect the experience for all members of the workspace. {t("Commenting")} Beta } description={t( "When enabled team members can add comments to documents." )} > {team.avatarUrl && ( )} ); } export default observer(Features);