Skip to content

Commit

Permalink
fix: navigation fix for avatars
Browse files Browse the repository at this point in the history
Signed-off-by: Sakul <sakulbudhathoki977@gmail.com>
  • Loading branch information
sakul-budhathoki committed May 18, 2021
1 parent 1330e0b commit f64c149
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/packages/components/avatars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
Maybe,
useMsgrContext,
} from '@berty-tech/store/hooks'
import { useNavigation } from '@berty-tech/navigation'
import { navigate } from '@berty-tech/navigation'
import beapi from '@berty-tech/api'
import PinkBotAvatar from '@berty-tech/assets/berty_bot_pink_bg.png'
import GreenDevAvatar from '@berty-tech/assets/berty_dev_green_bg.png'
Expand Down Expand Up @@ -136,7 +136,6 @@ export const HardcodedAvatar: React.FC<{
name: HardcodedAvatarKey
pressable?: boolean
}> = ({ size, style, name, pressable }) => {
const { navigate } = useNavigation()
const [{ border }] = useStyles()
let avatar = hardcodedAvatars[name]
if (!avatar) {
Expand All @@ -148,7 +147,7 @@ export const HardcodedAvatar: React.FC<{
activeOpacity={0.9}
disabled={!pressable}
onPress={() => {
navigate.modals.imageView({ images: [avatar], previewOnly: true })
navigate('ImageView', { images: [avatar], previewOnly: true })
}}
style={[{ borderRadius: size / 2, backgroundColor: 'white' }, border.shadow.medium, style]}
>
Expand Down

0 comments on commit f64c149

Please sign in to comment.