StatusBar: converting more things to links

Fixes urbit/landscape#509 and also adds same functionality to the rest of the StatusBar items
This commit is contained in:
Hunter Miller 2021-07-16 15:42:04 -05:00
parent 286c6c28e5
commit 35e01deed4

View File

@ -8,7 +8,7 @@ import {
Text
} from '@tlon/indigo-react';
import React, { useRef } from 'react';
import { useHistory } from 'react-router-dom';
import { Link, useHistory } from 'react-router-dom';
import { Sigil } from '~/logic/lib/sigil';
import { uxToHex } from '~/logic/lib/util';
import useContactState from '~/logic/state/contact';
@ -75,11 +75,12 @@ const StatusBar = (props) => {
>
<Row>
<Button
as={Link}
to="/"
width='32px'
borderColor='lightGray'
mr={2}
px={2}
onClick={() => history.push('/')}
{...props}
>
<Icon icon='Dashboard' color='black' />
@ -126,9 +127,10 @@ const StatusBar = (props) => {
<Icon icon="Bug" color="#000000" />
</StatusBarItem>
<StatusBarItem
as={Link}
to="/~landscape/messages"
width='32px'
mr={2}
onClick={() => props.history.push('/~landscape/messages')}
>
<Icon icon='Messages' />
</StatusBarItem>
@ -150,24 +152,26 @@ const StatusBar = (props) => {
boxShadow='0px 0px 0px 3px'
>
<Row
as={Link}
to={`/~profile/~${ship}`}
color='black'
cursor='pointer'
fontSize={1}
fontWeight='500'
px={3}
py={2}
onClick={() => history.push(`/~profile/~${ship}`)}
>
View Profile
</Row>
<Row
as={Link}
to="/~settings"
color='black'
cursor='pointer'
fontSize={1}
fontWeight='500'
px={3}
py={2}
onClick={() => history.push('/~settings')}
>
System Preferences
</Row>