Ensure bottom nav only shows on party pages
This commit is contained in:
parent
5a337003df
commit
557a5795e0
1 changed files with 7 additions and 4 deletions
|
|
@ -16,6 +16,7 @@ import { appState, initialAppState } from '~utils/appState'
|
||||||
|
|
||||||
import { ButtonType } from '~utils/enums'
|
import { ButtonType } from '~utils/enums'
|
||||||
import CrossIcon from '~public/icons/Cross.svg'
|
import CrossIcon from '~public/icons/Cross.svg'
|
||||||
|
import { route } from 'next/dist/server/router'
|
||||||
|
|
||||||
const BottomHeader = () => {
|
const BottomHeader = () => {
|
||||||
const account = useSnapshot(accountState)
|
const account = useSnapshot(accountState)
|
||||||
|
|
@ -64,12 +65,14 @@ const BottomHeader = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const leftNav = () => {
|
const leftNav = () => {
|
||||||
|
if (router.pathname === '/p/[party]') {
|
||||||
if (app.party.detailsVisible) {
|
if (app.party.detailsVisible) {
|
||||||
return (<Button icon="edit" active={true} click={toggleDetails}>Hide info</Button>)
|
return (<Button icon="edit" active={true} click={toggleDetails}>Hide info</Button>)
|
||||||
} else {
|
} else {
|
||||||
return (<Button icon="edit" click={toggleDetails}>Edit info</Button>)
|
return (<Button icon="edit" click={toggleDetails}>Edit info</Button>)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const rightNav = () => {
|
const rightNav = () => {
|
||||||
if (app.party.editable && router.route === '/p/[party]') {
|
if (app.party.editable && router.route === '/p/[party]') {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue