manifold/web/components/manifold-logo.tsx

28 lines
682 B
TypeScript
Raw Normal View History

import Link from 'next/link'
import clsx from 'clsx'
2022-01-23 00:16:23 +00:00
import { useUser } from '../hooks/use-user'
2022-01-18 19:16:35 +00:00
export function ManifoldLogo(props: {
className?: string
darkBackground?: boolean
}) {
const { darkBackground, className } = props
2022-01-23 00:16:23 +00:00
const user = useUser()
return (
2022-01-23 00:16:23 +00:00
<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}
/>
2022-03-02 01:18:46 +00:00
<img src={'/theoremone/TheoremOne-Logo.svg'} width={245} height={45} />
</a>
</Link>
)
}