5c12da140d
* Copy in nav from TailwindUI * Split up nav files * Hook up sidebar options to the current page * Tweak padding * Insert a right sidebar on folds & contracts * Keep column always centered * Remove markets and folds from top navbar * Extract out sidebaricon; link to /about * Rename to "useFollowedFoldIds" * Cache followed folds in localstorage * Remove unused mobile sidebar (for now) * Remove unused code * Remove sidebar from landing page * Tweak resolution panel styling * Remove the top navbar entirely * Completely remove the old navbar * Add "more" and profile link * Rearrange sidebar ordering * Remove unused component * Add Sign In button for logged-out users * Remove extra options for signed-out users
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
import Link from 'next/link'
|
|
import clsx from 'clsx'
|
|
|
|
import { useUser } from '../../hooks/use-user'
|
|
import { ENV_CONFIG } from '../../../common/envs/constants'
|
|
|
|
export function ManifoldLogo(props: {
|
|
className?: string
|
|
darkBackground?: boolean
|
|
hideText?: boolean
|
|
}) {
|
|
const { darkBackground, className, hideText } = props
|
|
|
|
const user = useUser()
|
|
|
|
return (
|
|
<Link href={user ? '/home' : '/'}>
|
|
<a className={clsx('group flex flex-shrink-0 flex-row gap-4', className)}>
|
|
<img
|
|
className="transition-all group-hover:rotate-12"
|
|
src={darkBackground ? '/logo-white.svg' : '/logo.svg'}
|
|
width={45}
|
|
height={45}
|
|
/>
|
|
|
|
{!hideText &&
|
|
(ENV_CONFIG.navbarLogoPath ? (
|
|
<img src={ENV_CONFIG.navbarLogoPath} width={245} height={45} />
|
|
) : (
|
|
<>
|
|
<div
|
|
className={clsx(
|
|
'font-major-mono mt-1 text-lg lowercase sm:hidden',
|
|
darkBackground && 'text-white'
|
|
)}
|
|
>
|
|
Manifold
|
|
<br />
|
|
Markets
|
|
</div>
|
|
<div
|
|
className={clsx(
|
|
'font-major-mono mt-1 hidden lowercase sm:flex sm:text-2xl md:whitespace-nowrap',
|
|
darkBackground && 'text-white'
|
|
)}
|
|
>
|
|
Manifold Markets
|
|
</div>
|
|
</>
|
|
))}
|
|
</a>
|
|
</Link>
|
|
)
|
|
}
|