Skip to content

Commit

Permalink
no coming soon button for visitors
Browse files Browse the repository at this point in the history
  • Loading branch information
goodeats committed May 23, 2024
1 parent 974bf34 commit 53fb483
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 4 additions & 1 deletion app/components/layout/page-footer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { useOptionalUser } from '#app/utils/user'
import Logo from '../logo'
import { ThemeSwitch } from '../theme-switch'

const PageFooter = () => {
const user = useOptionalUser()

return (
<div className="container flex justify-between pb-5">
<Logo />
<ThemeSwitch />
{user ? <ThemeSwitch /> : '🔺'}
</div>
)
}
Expand Down
9 changes: 2 additions & 7 deletions app/components/layout/page-header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Link } from '@remix-run/react'
import { useOptionalUser } from '#app/utils/user'
import Logo from '../logo'
import { ThemeSwitch } from '../theme-switch'
import { Button } from '../ui/button'
import { UserDropdown } from '../user-dropdown'

Expand All @@ -12,13 +13,7 @@ const PageHeader = () => {
<nav className="flex flex-wrap items-center justify-between gap-4 sm:flex-nowrap md:gap-8">
<Logo />
<div className="flex items-center gap-10">
{user ? (
<UserDropdown />
) : (
<Button asChild variant="default" size="lg">
<Link to="/">Coming Soon</Link>
</Button>
)}
{user ? <UserDropdown /> : <ThemeSwitch />}
</div>
</nav>
</header>
Expand Down
1 change: 0 additions & 1 deletion app/routes/_marketing+/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export async function loader({ params, request }: LoaderFunctionArgs) {
export default function Index() {
const data = useLoaderData<typeof loader>()
const { user } = data
console.log(user)

return (
<MarketingMainLayout>
Expand Down

0 comments on commit 53fb483

Please sign in to comment.