mirror of
https://github.com/Sosokker/B2D-Ventures.git
synced 2025-12-18 21:44:06 +01:00
chore: Refactor BusinessCard component to accept null values for description, joinDate, location, and tags
This commit is contained in:
parent
e29519708f
commit
75b3d71b98
@ -78,10 +78,10 @@ export default function Home() {
|
||||
<p className="text-lg">The deals attracting the most interest right now</p>
|
||||
</span>
|
||||
<div className="grid grid-cols-4 gap-4">
|
||||
<BusinessCard />
|
||||
<BusinessCard />
|
||||
<BusinessCard />
|
||||
<BusinessCard />
|
||||
<BusinessCard description={null} joinDate={null} location={null} tags={null} />
|
||||
<BusinessCard description={null} joinDate={null} location={null} tags={null} />
|
||||
<BusinessCard description={null} joinDate={null} location={null} tags={null} />
|
||||
<BusinessCard description={null} joinDate={null} location={null} tags={null} />
|
||||
</div>
|
||||
<div className="self-center py-5">
|
||||
<Button>
|
||||
|
||||
@ -1,8 +1,25 @@
|
||||
import Image from "next/image";
|
||||
import { Card, CardFooter, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import {
|
||||
Card,
|
||||
CardFooter,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { CalendarDaysIcon } from "lucide-react";
|
||||
|
||||
export function BusinessCard() {
|
||||
interface XMap {
|
||||
[tag: string]: string;
|
||||
}
|
||||
|
||||
interface BusinessCardProps {
|
||||
description: string | null;
|
||||
joinDate: string | null;
|
||||
location: string | null;
|
||||
tags: XMap | null;
|
||||
}
|
||||
|
||||
export function BusinessCard(props: BusinessCardProps) {
|
||||
return (
|
||||
<Card>
|
||||
<CardHeader>
|
||||
@ -18,7 +35,8 @@ export function BusinessCard() {
|
||||
</div>
|
||||
<CardTitle>NVIDIA</CardTitle>
|
||||
<CardDescription>
|
||||
Founded in 1993, NVIDIA is a key innovator of computer graphics and AI technology
|
||||
Founded in 1993, NVIDIA is a key innovator of computer graphics and AI
|
||||
technology
|
||||
<span className="flex items-center pt-2 gap-1">
|
||||
<CalendarDaysIcon width={20} />
|
||||
Joined December 2021
|
||||
@ -27,7 +45,9 @@ export function BusinessCard() {
|
||||
</CardHeader>
|
||||
<CardFooter className="flex-col items-start">
|
||||
Bangkok, Thailand
|
||||
<span className="text-xs rounded-md bg-slate-200 dark:bg-slate-700 p-1">Technology</span>
|
||||
<span className="text-xs rounded-md bg-slate-200 dark:bg-slate-700 p-1">
|
||||
Technology
|
||||
</span>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
);
|
||||
|
||||
@ -83,7 +83,7 @@ export function UnsignedNav() {
|
||||
},
|
||||
];
|
||||
return (
|
||||
<header className="relative flex flex-wrap w-full bg-card text-sm py-3 border-b-2 border-border">
|
||||
<header className="sticky top-0 flex flex-wrap w-full bg-card text-sm py-3 border-b-2 border-border">
|
||||
<nav className="max-w-[85rem] w-full mx-auto px-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex flex-col">
|
||||
@ -177,9 +177,11 @@ export function UnsignedNav() {
|
||||
<div className="flex gap-2 pl-2">
|
||||
<ThemeToggle />
|
||||
<Separator orientation="vertical" className="mx-3" />
|
||||
<Button variant="secondary" className="border-2 border-border">
|
||||
<Link href='/login'>Login</Link>
|
||||
</Button>
|
||||
<Link href="/login">
|
||||
<Button variant="secondary" className="border-2 border-border">
|
||||
Login
|
||||
</Button>
|
||||
</Link>
|
||||
<Button>Sign up</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user