Completely remove the old navbar
This commit is contained in:
parent
66add707a0
commit
055eecb071
|
@ -2,10 +2,7 @@ import clsx from 'clsx'
|
|||
import Link from 'next/link'
|
||||
|
||||
import { useUser } from '../../hooks/use-user'
|
||||
import { Row } from '../layout/row'
|
||||
import { firebaseLogin, User } from '../../lib/firebase/users'
|
||||
import { ManifoldLogo } from './manifold-logo'
|
||||
import { ProfileMenu } from './profile-menu'
|
||||
import {
|
||||
CollectionIcon,
|
||||
HomeIcon,
|
||||
|
@ -13,48 +10,6 @@ import {
|
|||
UserGroupIcon,
|
||||
} from '@heroicons/react/outline'
|
||||
|
||||
// Deprecated. TODO: Remove this entirely.
|
||||
export function NavBar(props: {
|
||||
darkBackground?: boolean
|
||||
wide?: boolean
|
||||
assertUser?: 'signed-in' | 'signed-out'
|
||||
className?: string
|
||||
}) {
|
||||
const { darkBackground, wide, assertUser, className } = props
|
||||
|
||||
const user = useUser()
|
||||
|
||||
const hoverClasses =
|
||||
'hover:underline hover:decoration-indigo-400 hover:decoration-2'
|
||||
const themeClasses = clsx(darkBackground && 'text-white', hoverClasses)
|
||||
|
||||
return (
|
||||
<>
|
||||
<nav className={clsx('mb-4 w-full p-4', className)} aria-label="Global">
|
||||
<Row
|
||||
className={clsx(
|
||||
'mx-auto items-center justify-between sm:px-4',
|
||||
wide ? 'max-w-6xl' : 'max-w-4xl'
|
||||
)}
|
||||
>
|
||||
<ManifoldLogo className="my-1" darkBackground={darkBackground} />
|
||||
|
||||
<Row className="ml-6 items-center gap-6 sm:gap-8">
|
||||
{(user || user === null || assertUser) && (
|
||||
<NavOptions
|
||||
user={user}
|
||||
assertUser={assertUser}
|
||||
themeClasses={themeClasses}
|
||||
/>
|
||||
)}
|
||||
</Row>
|
||||
</Row>
|
||||
</nav>
|
||||
<BottomNavBar />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
// From https://codepen.io/chris__sev/pen/QWGvYbL
|
||||
export function BottomNavBar() {
|
||||
const user = useUser()
|
||||
|
|
|
@ -5,25 +5,6 @@ import { Col } from '../layout/col'
|
|||
import { MenuButton } from './menu'
|
||||
import { IS_PRIVATE_MANIFOLD } from '../../../common/envs/constants'
|
||||
|
||||
export function ProfileMenu(props: { user: User | undefined }) {
|
||||
const { user } = props
|
||||
|
||||
return (
|
||||
<>
|
||||
<MenuButton
|
||||
className="hidden md:block"
|
||||
menuItems={getNavigationOptions(user, { mobile: false })}
|
||||
buttonContent={<ProfileSummary user={user} />}
|
||||
/>
|
||||
|
||||
<MenuButton
|
||||
className="mr-2 md:hidden"
|
||||
menuItems={getNavigationOptions(user, { mobile: true })}
|
||||
buttonContent={<ProfileSummary user={user} />}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
function getNavigationOptions(
|
||||
user: User | undefined,
|
||||
|
|
|
@ -10,7 +10,6 @@ import {
|
|||
import { firebaseLogin } from '../lib/firebase/users'
|
||||
import { ContractsGrid } from '../components/contracts-list'
|
||||
import { Col } from '../components/layout/col'
|
||||
import { NavBar } from '../components/nav/nav-bar'
|
||||
import Link from 'next/link'
|
||||
import { Contract } from '../lib/firebase/contracts'
|
||||
|
||||
|
@ -34,7 +33,6 @@ const scrollToAbout = () => {
|
|||
function Hero() {
|
||||
return (
|
||||
<div className="bg-world-trading h-screen overflow-hidden bg-gray-900 bg-cover bg-center lg:bg-left">
|
||||
<NavBar darkBackground />
|
||||
<main>
|
||||
<div className="pt-32 sm:pt-8 lg:overflow-hidden lg:pt-0 lg:pb-14">
|
||||
<div className="mx-auto max-w-7xl lg:px-8 xl:px-0">
|
||||
|
|
|
@ -3,7 +3,6 @@ import { DatumValue } from '@nivo/core'
|
|||
import { ResponsiveLine } from '@nivo/line'
|
||||
|
||||
import { Entry, makeEntries } from '../lib/simulator/entries'
|
||||
import { NavBar } from '../components/nav/nav-bar'
|
||||
import { Col } from '../components/layout/col'
|
||||
|
||||
function TableBody(props: { entries: Entry[] }) {
|
||||
|
@ -254,7 +253,6 @@ export default function Simulator() {
|
|||
|
||||
return (
|
||||
<Col>
|
||||
<NavBar />
|
||||
<div className="mx-auto mt-8 grid w-full grid-cols-1 gap-4 p-2 text-center xl:grid-cols-2">
|
||||
{/* Left column */}
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user