import { useState } from 'react' import { useTranslation } from 'next-i18next' import useBackend from 'site/hooks/useBackend.js' import Link from 'next/link' import { Icons, welcomeSteps } from '../shared.js' import Popout from 'shared/components/popout.js' import Markdown from 'react-markdown' export const namespaces = ['bio'] const Tab = ({ id, activeTab, setActiveTab, t }) => ( ) const UsernameSettings = ({ app, title = false, welcome = false }) => { const backend = useBackend(app) const { t } = useTranslation(namespaces) const [bio, setBio] = useState(app.account.bio) const [activeTab, setActiveTab] = useState('edit') const save = async () => { await backend.updateAccount({ bio }) } const nextHref = welcomeSteps[app.account.control].length > 5 ? '/welcome/' + welcomeSteps[app.account.control][6] : '/docs/guide' const tabProps = { activeTab, setActiveTab, t } return ( <> {title ?