diff --git a/src/app/(unauthenticated)/(landing)/_components/hero.tsx b/src/app/(unauthenticated)/(landing)/_components/hero.tsx index 9131488..a371c73 100644 --- a/src/app/(unauthenticated)/(landing)/_components/hero.tsx +++ b/src/app/(unauthenticated)/(landing)/_components/hero.tsx @@ -1,16 +1,87 @@ +'use client'; + import React from 'react'; +import Link from 'next/link'; + +import { api } from '@/convex/_generated/api'; +import { useQuery } from 'convex/react'; + export default function Hero() { + const portfolios = useQuery(api.portfolios.getAllPortfolios); + const numberOfPortfolios = portfolios?.length; + return ( <> -
- Browse our curated collection of exceptional designs to help you create - your best portfolio yet. + Browse our curated collection of{' '} + {numberOfPortfolios && ( + + {numberOfPortfolios}+ + + )}{' '} + exceptional designs to help you create your best portfolio yet.
> ); diff --git a/src/app/(unauthenticated)/portfolio/[id]/page.tsx b/src/app/(unauthenticated)/portfolio/[id]/page.tsx index 39b5ec4..10edd04 100644 --- a/src/app/(unauthenticated)/portfolio/[id]/page.tsx +++ b/src/app/(unauthenticated)/portfolio/[id]/page.tsx @@ -16,7 +16,7 @@ import { getImageUrl } from '@/lib/get-image-url'; import { cn } from '@/lib/utils'; import { SignInButton } from '@clerk/nextjs'; import { useMutation, useQuery } from 'convex/react'; -import { ChevronLeft, ExternalLink, Heart } from 'lucide-react'; +import { ExternalLink, Heart } from 'lucide-react'; export default function PortfolioPage({ params }: { params: { id: string } }) { const { id } = params; @@ -92,11 +92,15 @@ export default function PortfolioPage({ params }: { params: { id: string } }) { )}