Fix header & format
This commit is contained in:
@@ -23,7 +23,7 @@ import {
|
||||
|
||||
type AvatarUploadProps = {
|
||||
preloadedUser: Preloaded<typeof api.auth.getUser>;
|
||||
}
|
||||
};
|
||||
|
||||
const dataUrlToBlob = async (
|
||||
dataUrl: string,
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
'use client';
|
||||
|
||||
import type { ComponentProps } from 'react';
|
||||
import type { NavItem } from './navigation';
|
||||
import { Kanit } from 'next/font/google';
|
||||
import Image from 'next/image';
|
||||
import Link from 'next/link';
|
||||
import { useConvexAuth, useQuery } from 'convex/react';
|
||||
import { Coffee, Server, User, Wrench } from 'lucide-react';
|
||||
import { useQuery } from 'convex/react';
|
||||
|
||||
import { api } from '@gib/backend/convex/_generated/api.js';
|
||||
|
||||
import type { NavItem } from './navigation';
|
||||
import { Controls } from './controls';
|
||||
import { DesktopNavigation, MobileNavigation } from './navigation';
|
||||
|
||||
@@ -17,7 +19,8 @@ const kanitSans = Kanit({
|
||||
});
|
||||
|
||||
const Header = (headerProps: ComponentProps<'header'>) => {
|
||||
const user = useQuery(api.auth.getUser, {});
|
||||
const { isAuthenticated } = useConvexAuth();
|
||||
const user = useQuery(api.auth.getUser, isAuthenticated ? {} : 'skip');
|
||||
const navItems: NavItem[] = [
|
||||
{
|
||||
href: '/#features',
|
||||
|
||||
Reference in New Issue
Block a user