diff options
author | Ansh <anshnanda10@gmail.com> | 2023-09-15 04:40:59 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 16:10:59 -0700 |
commit | 50f811666aa8999bd7c6cf0c823437f23ddce4c6 (patch) | |
tree | 8228bde0c0cfd3ec21451f0100f037ddaa2a601e /src/view/shell/Drawer.tsx | |
parent | e643c434593927cb8ad85c32a1883b10548bc2f6 (diff) | |
download | voidsky-50f811666aa8999bd7c6cf0c823437f23ddce4c6.tar.zst |
Fix Profile link from drawer on Mobile Web (#1437)
* 🗺️ fix an issue where web devices that see the Drawer couldn't access Profile from said Drawer * fix routes on web * handle profile button active state * add hack for web navigation * fix comment --------- Co-authored-by: Micah Maligie <kerosuppi@gmail.com>
Diffstat (limited to 'src/view/shell/Drawer.tsx')
-rw-r--r-- | src/view/shell/Drawer.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx index 3379d0501..67092938e 100644 --- a/src/view/shell/Drawer.tsx +++ b/src/view/shell/Drawer.tsx @@ -64,8 +64,13 @@ export const DrawerContent = observer(function DrawerContentImpl() { const state = navigation.getState() store.shell.closeDrawer() if (isWeb) { - // @ts-ignore must be Home, Search, Notifications, or MyProfile - navigation.navigate(tab) + // hack because we have flat navigator for web and MyProfile does not exist on the web navigator -ansh + if (tab === 'MyProfile') { + navigation.navigate('Profile', {name: store.me.handle}) + } else { + // @ts-ignore must be Home, Search, Notifications, or MyProfile + navigation.navigate(tab) + } } else { const tabState = getTabState(state, tab) if (tabState === TabState.InsideAtRoot) { |