Kill the ugly "Sign in" button

This commit is contained in:
Austin Chen 2022-05-18 12:06:41 -04:00
parent 89b05be5ec
commit 44c53ae96d

View File

@ -137,22 +137,11 @@ export default function Sidebar(props: { className?: string }) {
return ( return (
<nav aria-label="Sidebar" className={className}> <nav aria-label="Sidebar" className={className}>
<ManifoldLogo className="pb-6" twoLine /> <ManifoldLogo className="pb-6" twoLine />
{user && (
<div className="mb-2" style={{ minHeight: 80 }}> <div className="mb-2" style={{ minHeight: 80 }}>
{user ? (
<ProfileSummary user={user} /> <ProfileSummary user={user} />
) : user === null ? (
<div className="py-6 text-center">
<button
className="btn btn-sm border-2 bg-white px-6 font-medium normal-case text-gray-700"
onClick={firebaseLogin}
>
Sign in
</button>
</div> </div>
) : (
<div />
)} )}
</div>
<div className="space-y-1 lg:hidden"> <div className="space-y-1 lg:hidden">
{mobileNavigationOptions.map((item) => ( {mobileNavigationOptions.map((item) => (
@ -180,15 +169,22 @@ export default function Sidebar(props: { className?: string }) {
/> />
</div> </div>
{user && (
<div className={'aligncenter flex justify-center'}> <div className={'aligncenter flex justify-center'}>
{user ? (
<Link href={'/create'} passHref> <Link href={'/create'} passHref>
<button className="mx-auto mt-4 -ml-1 w-full rounded-md border border-transparent bg-gradient-to-r from-purple-500 via-violet-500 to-indigo-500 py-2.5 text-base font-semibold text-white shadow-sm hover:from-purple-700 hover:via-violet-700 hover:to-indigo-700"> <button className="mx-auto mt-4 -ml-1 w-full rounded-md border border-transparent bg-gradient-to-r from-purple-500 via-violet-500 to-indigo-500 py-2.5 text-base font-semibold text-white shadow-sm hover:from-purple-700 hover:via-violet-700 hover:to-indigo-700">
Ask a question Ask a question
</button> </button>
</Link> </Link>
</div> ) : (
<button
onClick={firebaseLogin}
className="mx-auto mt-4 -ml-1 w-full rounded-md border border-transparent bg-gradient-to-r from-purple-500 via-violet-500 to-indigo-500 py-2.5 text-base font-semibold text-white shadow-sm hover:from-purple-700 hover:via-violet-700 hover:to-indigo-700"
>
Sign in
</button>
)} )}
</div>
{user && deservesDailyFreeMarket && ( {user && deservesDailyFreeMarket && (
<Row className="mt-2 justify-center"> <Row className="mt-2 justify-center">