import { Transition } from '@headlessui/react' import { useTranslation } from 'next-i18next' import { ChangeEvent, useState } from 'react' import { ModalProps } from '../../types/modal' import { PROFILE_CATEGORIES } from '../../utils/profile' import Input from '../forms/Input' import Label from '../forms/Label' import Select from '../forms/Select' import Button, { LinkButton } from '../shared/Button' import InlineNotification from '../shared/InlineNotification' import Modal from '../shared/Modal' import useLocalStorageState from '../../hooks/useLocalStorageState' export const SKIP_ACCOUNT_SETUP_KEY = 'skipAccountSetup' const UserSetupModal = ({ isOpen, onClose }: ModalProps) => { const { t } = useTranslation() const [profileName, setProfileName] = useState('') const [accountName, setAccountName] = useState('') const [profileCategory, setProfileCategory] = useState('') const [showAccountSetup, setShowAccountSetup] = useState(false) const [, setSkipAccountSetup] = useLocalStorageState(SKIP_ACCOUNT_SETUP_KEY) const handleSaveProfile = () => { // save profile details to db... setShowAccountSetup(true) } const handleUserSetup = () => { // create account } const handleSkipAccountSetup = () => { setSkipAccountSetup(true) onClose() } return ( <>

Create Profile

This is your Mango Identity and is used on our leaderboard and chat

setShowAccountSetup(true)}> I'll do this later

Account Setup

You need a Mango Account to get started

{/* Not sure if we need to name the first account or if every users first account should have the same name "Main Account" or something similar */}
handleSkipAccountSetup()}> I'll do this later
) } export default UserSetupModal