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 datasets page to dashboard #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
20 changes: 20 additions & 0 deletions app/(dashboard)/dashboard/datasets/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { BentoGrid, BentoGridItem } from "@/components/ui/bento-grid"
import { datasets } from "@/data/datasets"

export default function DatasetsPage() {
return (
<section className="w-full py-4 sm:p-10">
<h1 className="text-3xl font-bold mb-6">Curated Datasets</h1>
<BentoGrid>
{datasets.map((dataset) => (
<BentoGridItem
key={dataset.id}
title={dataset.title}
description={dataset.description}
header={<img src={dataset.image} alt={dataset.title} />}
/>
))}
</BentoGrid>
</section>
)
}
3 changes: 3 additions & 0 deletions app/(dashboard)/dashboard/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ export default async function DashboardLayout({
Resources
</h3>
<SidebarNav items={menuResources} />
<Link href="/dashboard/datasets" className="block py-2 text-sm text-muted-foreground hover:text-foreground">
Datasets
</Link>
</ScrollArea>
<footer className="fixed bottom-6 flex flex-col border-t pr-2 pt-4">
<LoggedUser user={user} />
Expand Down
21 changes: 21 additions & 0 deletions components/app/dashboard-dataset-card.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';

interface DashboardDatasetCardProps {
title: string;
description: string;
image: string;
}

const DashboardDatasetCard: React.FC<DashboardDatasetCardProps> = ({ title, description, image }) => {
return (
<div className="dataset-card">
<img src={image} alt={title} className="dataset-card-image" />
<div className="dataset-card-content">
<h2 className="dataset-card-title">{title}</h2>
<p className="dataset-card-description">{description}</p>
</div>
</div>
);
};

export default DashboardDatasetCard;
7 changes: 4 additions & 3 deletions config/menu-dashboard.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Menu Dashboard
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
export const menuDashboard = [
{
label: "API Key Management",
Expand All @@ -14,4 +11,8 @@ export const menuDashboard = [
label: "Submit",
href: "/dashboard/submit",
},
{
label: "Datasets",
href: "/dashboard/datasets",
},
]