da4ce99755
* Add dev target for TheoremOne * Restrict signups to theoremone.co emails * Add new indices * Forbid reads from unauthenticated users * Client-side render pages that need auth These pages are now client-side rendered: - /home - /leaderboards - /market/... - /fold/... * Hide 404 for private Manifolds * Brand instance for TheoremOne * Hide "Add Funds" and "Personalize your feed" * "M$" => "T$" * Hide Discord & About Page too * Update placeholders for teams * Update firestore.indexes.json * Switch /analytics to propz * Migrate per-env code into common/ * More migrations to PROJECT_ID * Conditionally use SSG depending on public vs private instance * Fix props to be empty object * Move more logic into access * Spin out config files for each environment * Generify most of the customizable brand stuff * Move IS_PRIVATE_MANIFOLD to access.ts * Rename access.ts to envs/constants.ts * Add "dev:dev" alias * Rever firestore rules to existing settings * Fixes according to James's review
52 lines
1.3 KiB
TypeScript
52 lines
1.3 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
|
|
}) {
|
|
const { darkBackground, className } = props
|
|
|
|
const user = useUser()
|
|
|
|
return (
|
|
<Link href={user ? '/home' : '/'}>
|
|
<a className={clsx('flex flex-shrink-0 flex-row gap-4', className)}>
|
|
<img
|
|
className="transition-all hover:rotate-12"
|
|
src={darkBackground ? '/logo-white.svg' : '/logo.svg'}
|
|
width={45}
|
|
height={45}
|
|
/>
|
|
{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>
|
|
)
|
|
}
|