import { Block, ParagraphSmall, Link, useStyletron } from "@mezo-org/mezo-clay" import React, { useCallback } from "react" import NestedViewLayout from "../NestedViewLayout" import InlineEditField from "./InlineEditField" import { useGetCurrentAccount, useUpdateUserProfile } from "../../../hooks" import { validateEmail, validateTelegram } from "../../../utils/validation" function Settings() { const [, theme] = useStyletron() const { data: account, isPending: isCurrentAccountPending } = useGetCurrentAccount() const { updateProfileAsync } = useUpdateUserProfile() const handleSaveEmail = useCallback( async (value: string) => { await updateProfileAsync({ email: value || "" }) }, [updateProfileAsync], ) const handleSaveTelegram = useCallback( async (value: string) => { const handle = value.startsWith("@") ? value.slice(1) : value await updateProfileAsync({ telegram: handle || "" }) }, [updateProfileAsync], ) return ( Update your contact information to stay connected. By providing your contact information, you agree to receive service notifications and occasional promotional messages. Promotional messages will always include an opt out link. The Privacy Policy is available{" "} here . ) } export default Settings