From fb334b1b3f6176965e08868530e39cb48d767b3f Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 17 Jan 2023 16:55:43 -0600 Subject: [PATCH] Add profile menuitem to main menu (close #47) --- src/view/lib/icons.tsx | 29 +++++++++++++++++++++++++++++ src/view/shell/mobile/Menu.tsx | 23 ++++++++++++++++++++--- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/src/view/lib/icons.tsx b/src/view/lib/icons.tsx index f79c8e60..bfcbb26b 100644 --- a/src/view/lib/icons.tsx +++ b/src/view/lib/icons.tsx @@ -198,6 +198,35 @@ export function CogIcon({ ) } +// Copyright (c) 2020 Refactoring UI Inc. +// https://github.com/tailwindlabs/heroicons/blob/master/LICENSE +export function UserIcon({ + style, + size, + strokeWidth = 1.5, +}: { + style?: StyleProp + size?: string | number + strokeWidth?: number +}) { + return ( + + + + ) +} + // Copyright (c) 2020 Refactoring UI Inc. // https://github.com/tailwindlabs/heroicons/blob/master/LICENSE export function UserGroupIcon({ diff --git a/src/view/shell/mobile/Menu.tsx b/src/view/shell/mobile/Menu.tsx index 3a6bbbc0..b06c1da9 100644 --- a/src/view/shell/mobile/Menu.tsx +++ b/src/view/shell/mobile/Menu.tsx @@ -11,7 +11,13 @@ import {observer} from 'mobx-react-lite' import VersionNumber from 'react-native-version-number' import {s, colors} from '../../lib/styles' import {useStores} from '../../../state' -import {HomeIcon, BellIcon, CogIcon, MagnifyingGlassIcon} from '../../lib/icons' +import { + HomeIcon, + BellIcon, + UserIcon, + CogIcon, + MagnifyingGlassIcon, +} from '../../lib/icons' import {UserAvatar} from '../../com/util/UserAvatar' import {Text} from '../../com/util/text/Text' import {ToggleButton} from '../../com/util/forms/ToggleButton' @@ -117,7 +123,7 @@ export const Menu = observer( Search - + } size="26" /> @@ -133,6 +139,17 @@ export const Menu = observer( url="/notifications" count={store.me.notificationCount} /> + } + size="30" + strokeWidth={2} + /> + } + label="Profile" + url={`/profile/${store.me.handle}`} + />