stacker.news/components/nav/mobile/second-bar.js

22 lines
623 B
JavaScript
Raw Normal View History

2024-02-23 15:32:20 +00:00
import { Nav, Navbar } from 'react-bootstrap'
import { NavPrice, NavWalletSummary, Sorts, hasNavSelect } from '../common'
2024-02-23 15:32:20 +00:00
import styles from '../../header.module.css'
import { useMe } from '@/components/me'
2024-02-23 15:32:20 +00:00
export default function SecondBar (props) {
const me = useMe()
2024-02-23 15:32:20 +00:00
const { topNavKey } = props
if (!hasNavSelect(props)) return null
2024-02-23 15:32:20 +00:00
return (
<Navbar>
<Nav
className={styles.navbarNav}
activeKey={topNavKey}
>
<Sorts {...props} />
{me ? <NavWalletSummary className='ms-auto px-2' /> : <NavPrice className='justify-content-end' />}
2024-02-23 15:32:20 +00:00
</Nav>
</Navbar>
)
}