Skip to content

Commit

Permalink
Navbar home link only works if logged in.
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikhaus committed Jan 13, 2025
1 parent a627538 commit fe21a53
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/components/layout/navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use server";

import { ThemeModeToggler } from "~/components/ui/theme-mode-toggler";
import { getServerAuthSession } from "../../server/auth";
import { getServerAuthSession } from "~/server/auth";
import AvatarDropdown from "./avatar-dropdown";

export default async function Navbar() {
Expand All @@ -10,20 +10,20 @@ export default async function Navbar() {
return (
<nav className="flex w-full flex-col content-start bg-background">
<div className="flex w-full items-center justify-between gap-3 border-b-[1px] p-3">
<div className="flex items-end">
<a href="/home">
<a href={user ? "/home" : ""}>
<div className="flex items-end">
<img
src="/img/blitzed-logo.svg"
width={35}
height={"auto"}
alt="blitzed-logo"
/>
</a>
<p className="hidden self-center text-3xl font-bold text-primary md:flex">
{" "}
Blitzed{" "}
</p>
</div>
<p className="hidden self-center text-3xl font-bold text-primary md:flex">
{" "}
Blitzed{" "}
</p>
</div>
</a>
<div className="flex gap-3">
<AvatarDropdown user={user} />
<ThemeModeToggler />
Expand Down

0 comments on commit fe21a53

Please sign in to comment.