|
@@ -4,6 +4,7 @@ import Link from "next/link";
|
|
|
import Image from "next/image";
|
|
import Image from "next/image";
|
|
|
import { LoginLink, LogoutLink, RegisterLink } from "@kinde-oss/kinde-auth-nextjs/server";
|
|
import { LoginLink, LogoutLink, RegisterLink } from "@kinde-oss/kinde-auth-nextjs/server";
|
|
|
import { useKindeBrowserClient } from "@kinde-oss/kinde-auth-nextjs";
|
|
import { useKindeBrowserClient } from "@kinde-oss/kinde-auth-nextjs";
|
|
|
|
|
+import { useTheme } from "@/app/providers";
|
|
|
import {
|
|
import {
|
|
|
NavigationMenu,
|
|
NavigationMenu,
|
|
|
NavigationMenuContent,
|
|
NavigationMenuContent,
|
|
@@ -51,8 +52,11 @@ const userMenuItems = [
|
|
|
|
|
|
|
|
export default function Header() {
|
|
export default function Header() {
|
|
|
const { isAuthenticated, getUser, isLoading } = useKindeBrowserClient();
|
|
const { isAuthenticated, getUser, isLoading } = useKindeBrowserClient();
|
|
|
|
|
+ const { theme } = useTheme();
|
|
|
const user = getUser();
|
|
const user = getUser();
|
|
|
|
|
|
|
|
|
|
+ const logoSrc = theme === "dark" ? "/vtorio-dark.svg" : "/vtorio.svg";
|
|
|
|
|
+
|
|
|
if (isLoading) {
|
|
if (isLoading) {
|
|
|
return (
|
|
return (
|
|
|
<header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
|
<header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
|
@@ -60,7 +64,7 @@ export default function Header() {
|
|
|
<div className="flex items-center gap-6">
|
|
<div className="flex items-center gap-6">
|
|
|
<Link href="/" className="flex items-center space-x-2">
|
|
<Link href="/" className="flex items-center space-x-2">
|
|
|
<Image
|
|
<Image
|
|
|
- src="/vtorio.svg"
|
|
|
|
|
|
|
+ src={logoSrc}
|
|
|
alt="vtor.io"
|
|
alt="vtor.io"
|
|
|
width={32}
|
|
width={32}
|
|
|
height={8}
|
|
height={8}
|
|
@@ -83,7 +87,7 @@ export default function Header() {
|
|
|
<div className="flex items-center gap-6">
|
|
<div className="flex items-center gap-6">
|
|
|
<Link href="/" className="flex items-center space-x-2">
|
|
<Link href="/" className="flex items-center space-x-2">
|
|
|
<Image
|
|
<Image
|
|
|
- src="/vtorio.svg"
|
|
|
|
|
|
|
+ src={logoSrc}
|
|
|
alt="vtor.io"
|
|
alt="vtor.io"
|
|
|
width={32}
|
|
width={32}
|
|
|
height={8}
|
|
height={8}
|