import { PageWrap } from '../../_shared/PageWrap' import { t } from '../../../utils/intl' import type { PageProps } from '../../types' import { Icon } from '../../_shared/Icon' import ProfileSettingsNavigation from '../../Discours/ProfileSettingsNavigation' import { useSession } from '../../../context/session' import { createMemo, For, createSignal, Show, createEffect } from 'solid-js' import { loadAuthor, useAuthorsStore } from '../../../stores/zine/authors' import type { Author } from '../../../graphql/types.gen' import { clsx } from 'clsx' import styles from './Settings.module.scss' export const ProfileSettingsPage = (props: PageProps) => { const [author, setAuthor] = createSignal(null) const { session } = useSession() const currentSlug = createMemo(() => session()?.user?.slug) const { authorEntities } = useAuthorsStore({ authors: [] }) const currentAuthor = createMemo(() => authorEntities()[currentSlug()]) createEffect(async () => { if (!currentSlug()) return try { await loadAuthor({ slug: currentSlug() }) setAuthor(currentAuthor()) console.log('!!! currentAuthor:', currentAuthor()) } catch (error) { console.error(error) } }) return (

{t('Profile settings')}

{t('Here you can customize your profile the way you want.')}

{t('Userpic')}

{t('Name')}

{t( 'Your name will appear on your profile page and as your signature in publications, comments and responses.' )}

{t('Address on Discourse')}

{t('Sorry, this address is already taken, please choose another one.')}

{t('Introduce')}

{t('How can I help/skills')}

{t('Where')}

{t('Date of Birth')}

{t('Social networks')}

{(link) => (
)}

) } // for lazy loading export default ProfileSettingsPage