From 07ecd3ab41c2efbb310baba71276ac649863e956 Mon Sep 17 00:00:00 2001 From: bender Date: Mon, 2 Mar 2026 23:13:00 +0000 Subject: [PATCH] Add src/app/dashboard/page.tsx --- src/app/dashboard/page.tsx | 168 +++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 src/app/dashboard/page.tsx diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx new file mode 100644 index 0000000..d346134 --- /dev/null +++ b/src/app/dashboard/page.tsx @@ -0,0 +1,168 @@ +"use client"; + +import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; +import NavbarStyleCentered from "@/components/navbar/NavbarStyleCentered/NavbarStyleCentered"; +import { useState } from "react"; +import { Upload, Music, BookOpen, Download, Play, Plus } from "lucide-react"; + +export default function DashboardPage() { + const [uploadedFiles, setUploadedFiles] = useState>([ + { id: "1", name: "Calculus I - Chapter 3.pdf", status: "ready", audioUrl: "/audio/calculus-3.mp3" }, + { id: "2", name: "Biology Notes - Photosynthesis.docx", status: "processing" }, + ]); + + const [materials, setMaterials] = useState>([ + { id: "m1", title: "Physics Fundamentals", creator: "Prof. James Chen", subject: "Physics", downloads: 1250 }, + { id: "m2", title: "History of Africa", creator: "Dr. Amara Okonkwo", subject: "History", downloads: 892 }, + { id: "m3", title: "Advanced Chemistry", creator: "Prof. Sarah Kipchoge", subject: "Chemistry", downloads: 654 }, + { id: "m4", title: "Literature Analysis", creator: "Dr. Kwesi Mensah", subject: "Literature", downloads: 456 }, + ]); + + const handleFileUpload = (e: React.ChangeEvent) => { + const files = e.target.files; + if (files) { + Array.from(files).forEach((file) => { + setUploadedFiles([...uploadedFiles, { + id: Date.now().toString(), + name: file.name, + status: "processing" + }]); + }); + } + }; + + return ( + + + +
+
+ {/* Header */} +
+

Your Learning Dashboard

+

Upload lecture notes and access materials from creators and artists

+
+ + {/* Upload Section */} +
+
+ +

Generate Audio from Your Notes

+
+
+ + +
+
+ + {/* My Uploads */} +
+
+ +

My Uploaded Materials

+
+
+ {uploadedFiles.map((file) => ( +
+
+
+ +
+
+

{file.name}

+

+ {file.status === "processing" ? "Processing..." : "Ready to listen"} +

+
+
+
+ {file.status === "ready" && file.audioUrl && ( + <> + + + + )} + {file.status === "processing" && ( +
+ +
+ )} +
+
+ ))} +
+
+ + {/* Online Materials */} +
+
+
+ +

Online Materials from Creators

+
+ +
+
+ {materials.map((material) => ( +
+
+ +
+

{material.title}

+

{material.creator}

+
+ {material.subject} + {material.downloads} downloads +
+
+ ))} +
+
+
+
+
+ ); +}