import { t } from "@lingui/core/macro"; import { env } from "next-runtime-env"; import Button from "~/components/Button"; import FeedbackModal from "~/components/FeedbackModal"; import { FontSizeSelector } from "~/components/FontSizeSelector"; import { LanguageSelector } from "~/components/LanguageSelector"; import Modal from "~/components/modal"; import { NewWorkspaceForm } from "~/components/NewWorkspaceForm"; import { PageHead } from "~/components/PageHead"; import { useModal } from "~/providers/modal"; import { api } from "~/utils/api"; import Avatar from "./components/Avatar"; import { ChangePasswordFormConfirmation } from "./components/ChangePasswordConfirmation"; import { DeleteAccountConfirmation } from "./components/DeleteAccountConfirmation"; import UpdateDisplayNameForm from "./components/UpdateDisplayNameForm"; export default function AccountSettings() { const { modalContentType, openModal, isOpen } = useModal(); const isCredentialsEnabled = env("NEXT_PUBLIC_ALLOW_CREDENTIALS")?.toLowerCase() === "true"; const { data } = api.user.getUser.useQuery(); return ( <>

{t`Profile picture`}

{t`Display name`}

{t`Email`}

{data?.email}

{t`Language`}

{t`Change your language preferences.`}

{t`Font size`}

{t`Change the application font size.`}

{t`Delete account`}

{t`Once you delete your account, there is no going back. This action cannot be undone.`}

{isCredentialsEnabled && (

{t`Change Password`}

{t`You are about to change your password.`}

)}
{/* Account-specific modals */} {/* Global modals */} ); }