Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cta on page header discover #1048

Merged
merged 2 commits into from
Mar 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 53 additions & 6 deletions app/(saas)/discover/_features/page-header/page-header.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,61 @@
import background from "@/public/images/backgrounds/discover-header.png";
import { ArrowRight } from "lucide-react";
import { ArrowRight, Bot, FolderSearch, LayoutList } from "lucide-react";
import Image from "next/image";
import Link from "next/link";

import { NEXT_ROUTER } from "@/shared/constants/router";
import { Button } from "@/shared/ui/button";
import { Card, CardDescription, CardHeader, CardTitle } from "@/shared/ui/card";
import { GlowingEffect } from "@/shared/ui/glowing-effect";
import { TypographyH2, TypographyP } from "@/shared/ui/typography";

export function PageHeader() {
function HasSufficentData() {
return (
<Button>
You don’t find your perfect fit ?
<ArrowRight />
</Button>
);
}

function NoSufficentData() {
return (
<div className="flex flex-col gap-4">
<TypographyP className="text-center">Didn’t find what you’re looking for?</TypographyP>
<div className="flex flex-row gap-4">
<Link href={NEXT_ROUTER.projects.root} className="flex-1 cursor-pointer transition-opacity hover:opacity-80">
<Card className="relative flex-1">
<GlowingEffect spread={40} glow={true} disabled={false} proximity={64} inactiveZone={0.01} />

<CardHeader className="flex flex-col gap-2">
<div className="flex flex-row items-center gap-2">
<FolderSearch className="size-5 text-cyan-200" />
<CardTitle className="text-left text-base text-cyan-100">Browse</CardTitle>
</div>
<CardDescription className="text-left">Explore projects on your own with Browse.</CardDescription>
</CardHeader>
</Card>
</Link>
<Link href={NEXT_ROUTER.odSay.root} className="flex-1 cursor-pointer transition-opacity hover:opacity-80">
<Card className="relative flex-1">
<GlowingEffect spread={40} glow={true} disabled={false} proximity={64} inactiveZone={0.01} />

<CardHeader className="flex flex-col gap-2">
<div className="flex flex-row items-center gap-2">
<Bot className="size-5 text-purple-200" />
<CardTitle className="text-left text-base text-purple-100">ODSay</CardTitle>
</div>
<CardDescription className="text-left">Let our chatbot help you find the right project.</CardDescription>
</CardHeader>
</Card>
</Link>
</div>
</div>
);
}
export function PageHeader({ hasSufficentData = false }: { hasSufficentData?: boolean }) {
const Footer = hasSufficentData ? HasSufficentData : NoSufficentData;

return (
<header className="relative z-[1] w-full py-16">
<Image
Expand All @@ -26,10 +76,7 @@ export function PageHeader() {
Get recommendations based on your profile and past contributions
</TypographyP>
</div>
<Button>
You don’t find your perfect fit ?
<ArrowRight />
</Button>
<Footer />
</div>
</header>
);
Expand Down
Loading