Rework profile page to include working view selector

This commit is contained in:
Paul Frazee 2022-09-06 14:26:39 -05:00
parent 2ec09ba545
commit bb06ef4f6e
19 changed files with 569 additions and 94 deletions

View file

@ -12,9 +12,14 @@ import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import {AVIS} from '../../lib/assets'
import {s, colors} from '../../lib/styles'
export function createAccountsMenu(): RootSiblings {
export function createAccountsMenu({
debug_onPressItem,
}: {
debug_onPressItem: () => void
}): RootSiblings {
const onPressItem = (_index: number) => {
sibling.destroy()
debug_onPressItem() // TODO
}
const onOuterPress = () => sibling.destroy()
const sibling = new RootSiblings(

View file

@ -99,7 +99,10 @@ export const MobileShell: React.FC = observer(() => {
const [isLocationMenuActive, setLocationMenuActive] = useState(false)
const screenRenderDesc = constructScreenRenderDesc(store.nav)
const onPressAvi = () => createAccountsMenu()
const onPressAvi = () =>
createAccountsMenu({
debug_onPressItem: () => store.nav.navigate('/profile/alice.com'),
})
const onPressLocation = () => setLocationMenuActive(true)
const onPressEllipsis = () => createLocationMenu()