From cfcca6c85f1b5266b0b387c21ca2a17a2450c1c9 Mon Sep 17 00:00:00 2001 From: ONEONUORA Date: Mon, 21 Jul 2025 19:39:30 -0700 Subject: [PATCH 1/3] feat: add admin dashboard, SEO and refactor the Codebase --- src/app/dashboard/admin/analytics/page.tsx | 18 + .../admin/community-and-events/page.tsx | 18 + .../admin/components/admin-sidenavbar.tsx | 84 ++ .../admin/content-management/page.tsx | 18 + src/app/dashboard/admin/layout.tsx | 26 + .../dashboard/admin/notifications/page.tsx | 18 + src/app/dashboard/admin/page.tsx | 18 + src/app/dashboard/admin/transactions/page.tsx | 18 + .../dashboard/admin/user-management/page.tsx | 18 + .../readers/components/book-modal.tsx | 248 +++++ .../readers}/components/book-reader-modal.tsx | 0 .../readers/components/header-reader.tsx | 50 + .../readers/components/reader-side-navbar.tsx | 108 +++ .../discussions-and-clubs/ClubCard.tsx | 0 .../discussions-and-clubs/[id]/page.tsx | 0 .../components/AddGuest.tsx | 0 .../components/ClubDetails.tsx | 0 .../components/ClubDiscussion.tsx | 0 .../components/ClubToolBar.tsx | 0 .../components/CreateEvent.tsx | 0 .../components/Modal.tsx | 0 .../components/ScheduleEvent.tsx | 0 .../components/StartEvent.tsx | 0 .../components/SuccessModal.tsx | 0 .../readers}/discussions-and-clubs/page.tsx | 0 src/app/dashboard/readers/layout.tsx | 26 + src/app/dashboard/readers/library/page.tsx | 898 ++++++++++++++++++ .../notifications/notification-detail.tsx | 66 ++ .../readers}/notifications/page.tsx | 0 src/app/dashboard/readers/page.tsx | 18 + .../readers}/profile/following/page.tsx | 0 src/app/dashboard/readers/profile/layout.tsx | 121 +++ src/app/dashboard/readers/profile/page.tsx | 264 +++++ .../readers}/profile/preferences/page.tsx | 0 .../readers}/profile/privacy/page.tsx | 0 .../readers}/profile/sign-out/page.tsx | 0 .../dashboard/readers/reading-stats/page.tsx | 22 + .../readers}/stats-and-achievements/page.tsx | 0 .../dashboard/readers/transactions/page.tsx | 340 +++++++ .../transactions/transaction-details.tsx | 381 ++++++++ src/app/dashboard/readers/wishlist/page.tsx | 201 ++++ src/app/dashboard/writers/analytics/page.tsx | 32 + .../components/notification-detail.tsx | 0 .../discussions-and-clubs/ClubCard.tsx | 99 ++ .../discussions-and-clubs/[id]/page.tsx | 191 ++++ .../components/AddGuest.tsx | 50 + .../components/ClubDetails.tsx | 129 +++ .../components/ClubDiscussion.tsx | 209 ++++ .../components/ClubToolBar.tsx | 53 ++ .../components/CreateEvent.tsx | 116 +++ .../components/Modal.tsx | 61 ++ .../components/ScheduleEvent.tsx | 169 ++++ .../components/StartEvent.tsx | 44 + .../components/SuccessModal.tsx | 53 ++ .../writers/discussions-and-clubs/page.tsx | 171 ++++ src/app/dashboard/writers/earnings/page.tsx | 112 +++ .../writers}/feedback/page.tsx | 0 .../writers}/layout.tsx | 0 .../manage-content/BookContentStep.tsx | 157 +++ .../manage-content/BookCreationFlow.tsx | 0 .../manage-content/BookDetailsStep.tsx | 323 +++++++ .../ContributorDetailsModal.tsx | 76 ++ .../manage-content/ContributorTypeModal.tsx | 0 .../writers/manage-content/Manage-content.tsx | 520 ++++++++++ .../writers/manage-content/PreviewModal.tsx | 170 ++++ .../writers/manage-content/PricingStep.tsx | 209 ++++ .../manage-content/ProgressStepper.tsx | 0 .../manage-content/PublishTypeModal.tsx | 108 +++ .../manage-content/PublishingNft/Pricing.tsx | 139 +++ .../PublishingNft/bookContent.tsx | 206 ++++ .../PublishingNft/bookDetail.tsx | 130 +++ .../manage-content/PublishingNft/genre.tsx | 0 .../manage-content/PublishingNft/page.tsx | 0 .../writers}/manage-content/StepIndicator.tsx | 0 .../writers/manage-content/SuccessModal.tsx | 48 + .../manage-content/book-preview-modal.tsx | 206 ++++ .../writers}/manage-content/example.tsx | 0 .../writers}/manage-content/loading.tsx | 0 .../writers}/manage-content/page.tsx | 0 .../notifications/notification-detail.tsx | 66 ++ .../writers}/notifications/page.tsx | 0 .../writers}/page.tsx | 0 .../profile/component/ProfileForm.tsx | 0 .../writers}/profile/component/Social.tsx | 0 .../profile/component/UpdatePasswordForm.tsx | 0 .../writers}/profile/component/genre.tsx | 0 .../profile/component/profileHeader.tsx | 0 .../profile/component/profilesidebar.tsx | 63 ++ .../writers}/profile/genre/page.tsx | 0 .../writers}/profile/layout.tsx | 0 .../writers}/profile/page.tsx | 0 .../writers}/profile/password/page.tsx | 0 .../writers}/profile/social/page.tsx | 0 .../components/book-modal.tsx | 2 +- .../readers/components/book-reader-modal.tsx | 267 ++++++ .../components/header-reader.tsx | 0 .../components/reader-side-navbar.tsx | 0 .../discussions-and-clubs/ClubCard.tsx | 99 ++ .../discussions-and-clubs/[id]/page.tsx | 191 ++++ .../components/AddGuest.tsx | 50 + .../components/ClubDetails.tsx | 129 +++ .../components/ClubDiscussion.tsx | 209 ++++ .../components/ClubToolBar.tsx | 53 ++ .../components/CreateEvent.tsx | 116 +++ .../components/Modal.tsx | 61 ++ .../components/ScheduleEvent.tsx | 169 ++++ .../components/StartEvent.tsx | 44 + .../components/SuccessModal.tsx | 53 ++ .../readers/discussions-and-clubs/page.tsx | 171 ++++ .../{reader-dashboard => readers}/layout.tsx | 0 .../library/page.tsx | 0 .../notifications/notification-detail.tsx | 0 src/app/readers/notifications/page.tsx | 193 ++++ .../{reader-dashboard => readers}/page.tsx | 0 src/app/readers/profile/following/page.tsx | 138 +++ .../profile/layout.tsx | 0 .../profile/page.tsx | 0 src/app/readers/profile/preferences/page.tsx | 210 ++++ src/app/readers/profile/privacy/page.tsx | 28 + src/app/readers/profile/sign-out/page.tsx | 28 + .../readers/stats-and-achievements/page.tsx | 151 +++ .../transactions/page.tsx | 0 .../transactions/transaction-details.tsx | 0 .../wishlist/page.tsx | 0 src/app/waiting-room/page.tsx | 2 +- .../analytics/page.tsx | 0 .../components/notification-detail.tsx | 83 ++ .../earnings/page.tsx | 10 +- src/app/writers/feedback/page.tsx | 12 + src/app/writers/layout.tsx | 18 + .../manage-content/BookContentStep.tsx | 0 .../manage-content/BookCreationFlow.tsx | 110 +++ .../manage-content/BookDetailsStep.tsx | 0 .../ContributorDetailsModal.tsx | 0 .../manage-content/ContributorTypeModal.tsx | 53 ++ .../manage-content/Manage-content.tsx | 0 .../manage-content/PreviewModal.tsx | 0 .../manage-content/PricingStep.tsx | 0 .../manage-content/ProgressStepper.tsx | 59 ++ .../manage-content/PublishTypeModal.tsx | 0 .../manage-content/PublishingNft/Pricing.tsx | 0 .../PublishingNft/bookContent.tsx | 0 .../PublishingNft/bookDetail.tsx | 0 .../manage-content/PublishingNft/genre.tsx | 24 + .../manage-content/PublishingNft/page.tsx | 118 +++ .../writers/manage-content/StepIndicator.tsx | 121 +++ .../manage-content/SuccessModal.tsx | 0 .../manage-content/book-preview-modal.tsx | 0 src/app/writers/manage-content/example.tsx | 17 + src/app/writers/manage-content/loading.tsx | 3 + src/app/writers/manage-content/page.tsx | 16 + .../notifications/notification-detail.tsx | 0 src/app/writers/notifications/page.tsx | 192 ++++ src/app/writers/page.tsx | 67 ++ .../writers/profile/component/ProfileForm.tsx | 203 ++++ src/app/writers/profile/component/Social.tsx | 116 +++ .../profile/component/UpdatePasswordForm.tsx | 111 +++ src/app/writers/profile/component/genre.tsx | 74 ++ .../profile/component/profileHeader.tsx | 41 + .../profile/component/profilesidebar.tsx | 0 src/app/writers/profile/genre/page.tsx | 12 + src/app/writers/profile/layout.tsx | 20 + src/app/writers/profile/page.tsx | 15 + src/app/writers/profile/password/page.tsx | 11 + src/app/writers/profile/social/page.tsx | 13 + .../Chart.tsx | 0 .../EarningSummary.tsx | 0 .../FilterBar.tsx | 0 .../LinkWallet.tsx | 0 .../LoanRow.tsx | 0 .../MobileLoanRow.tsx | 0 .../MobileTable.tsx | 0 .../RequestPaymentModal.tsx | 0 .../RevenueBreakdown.tsx | 0 .../TransactionHistory.tsx | 0 .../TransactionModalButton.tsx | 0 .../TransactionTable.tsx | 0 src/components/dashboard/sidebar.tsx | 20 +- 178 files changed, 10775 insertions(+), 17 deletions(-) create mode 100644 src/app/dashboard/admin/analytics/page.tsx create mode 100644 src/app/dashboard/admin/community-and-events/page.tsx create mode 100644 src/app/dashboard/admin/components/admin-sidenavbar.tsx create mode 100644 src/app/dashboard/admin/content-management/page.tsx create mode 100644 src/app/dashboard/admin/layout.tsx create mode 100644 src/app/dashboard/admin/notifications/page.tsx create mode 100644 src/app/dashboard/admin/page.tsx create mode 100644 src/app/dashboard/admin/transactions/page.tsx create mode 100644 src/app/dashboard/admin/user-management/page.tsx create mode 100644 src/app/dashboard/readers/components/book-modal.tsx rename src/app/{reader-dashboard => dashboard/readers}/components/book-reader-modal.tsx (100%) create mode 100644 src/app/dashboard/readers/components/header-reader.tsx create mode 100644 src/app/dashboard/readers/components/reader-side-navbar.tsx rename src/app/{reader-dashboard => dashboard/readers}/discussions-and-clubs/ClubCard.tsx (100%) rename src/app/{reader-dashboard => dashboard/readers}/discussions-and-clubs/[id]/page.tsx (100%) rename src/app/{reader-dashboard => dashboard/readers}/discussions-and-clubs/components/AddGuest.tsx (100%) rename src/app/{reader-dashboard => dashboard/readers}/discussions-and-clubs/components/ClubDetails.tsx (100%) rename src/app/{reader-dashboard => dashboard/readers}/discussions-and-clubs/components/ClubDiscussion.tsx (100%) rename src/app/{reader-dashboard => dashboard/readers}/discussions-and-clubs/components/ClubToolBar.tsx (100%) rename src/app/{reader-dashboard => dashboard/readers}/discussions-and-clubs/components/CreateEvent.tsx (100%) rename src/app/{reader-dashboard => dashboard/readers}/discussions-and-clubs/components/Modal.tsx (100%) rename src/app/{reader-dashboard => dashboard/readers}/discussions-and-clubs/components/ScheduleEvent.tsx (100%) rename src/app/{reader-dashboard => dashboard/readers}/discussions-and-clubs/components/StartEvent.tsx (100%) rename src/app/{reader-dashboard => dashboard/readers}/discussions-and-clubs/components/SuccessModal.tsx (100%) rename src/app/{reader-dashboard => dashboard/readers}/discussions-and-clubs/page.tsx (100%) create mode 100644 src/app/dashboard/readers/layout.tsx create mode 100644 src/app/dashboard/readers/library/page.tsx create mode 100644 src/app/dashboard/readers/notifications/notification-detail.tsx rename src/app/{reader-dashboard => dashboard/readers}/notifications/page.tsx (100%) create mode 100644 src/app/dashboard/readers/page.tsx rename src/app/{reader-dashboard => dashboard/readers}/profile/following/page.tsx (100%) create mode 100644 src/app/dashboard/readers/profile/layout.tsx create mode 100644 src/app/dashboard/readers/profile/page.tsx rename src/app/{reader-dashboard => dashboard/readers}/profile/preferences/page.tsx (100%) rename src/app/{reader-dashboard => dashboard/readers}/profile/privacy/page.tsx (100%) rename src/app/{reader-dashboard => dashboard/readers}/profile/sign-out/page.tsx (100%) create mode 100644 src/app/dashboard/readers/reading-stats/page.tsx rename src/app/{reader-dashboard => dashboard/readers}/stats-and-achievements/page.tsx (100%) create mode 100644 src/app/dashboard/readers/transactions/page.tsx create mode 100644 src/app/dashboard/readers/transactions/transaction-details.tsx create mode 100644 src/app/dashboard/readers/wishlist/page.tsx create mode 100644 src/app/dashboard/writers/analytics/page.tsx rename src/app/{writer-dashboard => dashboard/writers}/components/notification-detail.tsx (100%) create mode 100644 src/app/dashboard/writers/discussions-and-clubs/ClubCard.tsx create mode 100644 src/app/dashboard/writers/discussions-and-clubs/[id]/page.tsx create mode 100644 src/app/dashboard/writers/discussions-and-clubs/components/AddGuest.tsx create mode 100644 src/app/dashboard/writers/discussions-and-clubs/components/ClubDetails.tsx create mode 100644 src/app/dashboard/writers/discussions-and-clubs/components/ClubDiscussion.tsx create mode 100644 src/app/dashboard/writers/discussions-and-clubs/components/ClubToolBar.tsx create mode 100644 src/app/dashboard/writers/discussions-and-clubs/components/CreateEvent.tsx create mode 100644 src/app/dashboard/writers/discussions-and-clubs/components/Modal.tsx create mode 100644 src/app/dashboard/writers/discussions-and-clubs/components/ScheduleEvent.tsx create mode 100644 src/app/dashboard/writers/discussions-and-clubs/components/StartEvent.tsx create mode 100644 src/app/dashboard/writers/discussions-and-clubs/components/SuccessModal.tsx create mode 100644 src/app/dashboard/writers/discussions-and-clubs/page.tsx create mode 100644 src/app/dashboard/writers/earnings/page.tsx rename src/app/{writer-dashboard => dashboard/writers}/feedback/page.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/layout.tsx (100%) create mode 100644 src/app/dashboard/writers/manage-content/BookContentStep.tsx rename src/app/{writer-dashboard => dashboard/writers}/manage-content/BookCreationFlow.tsx (100%) create mode 100644 src/app/dashboard/writers/manage-content/BookDetailsStep.tsx create mode 100644 src/app/dashboard/writers/manage-content/ContributorDetailsModal.tsx rename src/app/{writer-dashboard => dashboard/writers}/manage-content/ContributorTypeModal.tsx (100%) create mode 100644 src/app/dashboard/writers/manage-content/Manage-content.tsx create mode 100644 src/app/dashboard/writers/manage-content/PreviewModal.tsx create mode 100644 src/app/dashboard/writers/manage-content/PricingStep.tsx rename src/app/{writer-dashboard => dashboard/writers}/manage-content/ProgressStepper.tsx (100%) create mode 100644 src/app/dashboard/writers/manage-content/PublishTypeModal.tsx create mode 100644 src/app/dashboard/writers/manage-content/PublishingNft/Pricing.tsx create mode 100644 src/app/dashboard/writers/manage-content/PublishingNft/bookContent.tsx create mode 100644 src/app/dashboard/writers/manage-content/PublishingNft/bookDetail.tsx rename src/app/{writer-dashboard => dashboard/writers}/manage-content/PublishingNft/genre.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/manage-content/PublishingNft/page.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/manage-content/StepIndicator.tsx (100%) create mode 100644 src/app/dashboard/writers/manage-content/SuccessModal.tsx create mode 100644 src/app/dashboard/writers/manage-content/book-preview-modal.tsx rename src/app/{writer-dashboard => dashboard/writers}/manage-content/example.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/manage-content/loading.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/manage-content/page.tsx (100%) create mode 100644 src/app/dashboard/writers/notifications/notification-detail.tsx rename src/app/{writer-dashboard => dashboard/writers}/notifications/page.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/page.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/profile/component/ProfileForm.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/profile/component/Social.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/profile/component/UpdatePasswordForm.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/profile/component/genre.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/profile/component/profileHeader.tsx (100%) create mode 100644 src/app/dashboard/writers/profile/component/profilesidebar.tsx rename src/app/{writer-dashboard => dashboard/writers}/profile/genre/page.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/profile/layout.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/profile/page.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/profile/password/page.tsx (100%) rename src/app/{writer-dashboard => dashboard/writers}/profile/social/page.tsx (100%) rename src/app/{reader-dashboard => readers}/components/book-modal.tsx (99%) create mode 100644 src/app/readers/components/book-reader-modal.tsx rename src/app/{reader-dashboard => readers}/components/header-reader.tsx (100%) rename src/app/{reader-dashboard => readers}/components/reader-side-navbar.tsx (100%) create mode 100644 src/app/readers/discussions-and-clubs/ClubCard.tsx create mode 100644 src/app/readers/discussions-and-clubs/[id]/page.tsx create mode 100644 src/app/readers/discussions-and-clubs/components/AddGuest.tsx create mode 100644 src/app/readers/discussions-and-clubs/components/ClubDetails.tsx create mode 100644 src/app/readers/discussions-and-clubs/components/ClubDiscussion.tsx create mode 100644 src/app/readers/discussions-and-clubs/components/ClubToolBar.tsx create mode 100644 src/app/readers/discussions-and-clubs/components/CreateEvent.tsx create mode 100644 src/app/readers/discussions-and-clubs/components/Modal.tsx create mode 100644 src/app/readers/discussions-and-clubs/components/ScheduleEvent.tsx create mode 100644 src/app/readers/discussions-and-clubs/components/StartEvent.tsx create mode 100644 src/app/readers/discussions-and-clubs/components/SuccessModal.tsx create mode 100644 src/app/readers/discussions-and-clubs/page.tsx rename src/app/{reader-dashboard => readers}/layout.tsx (100%) rename src/app/{reader-dashboard => readers}/library/page.tsx (100%) rename src/app/{reader-dashboard => readers}/notifications/notification-detail.tsx (100%) create mode 100644 src/app/readers/notifications/page.tsx rename src/app/{reader-dashboard => readers}/page.tsx (100%) create mode 100644 src/app/readers/profile/following/page.tsx rename src/app/{reader-dashboard => readers}/profile/layout.tsx (100%) rename src/app/{reader-dashboard => readers}/profile/page.tsx (100%) create mode 100644 src/app/readers/profile/preferences/page.tsx create mode 100644 src/app/readers/profile/privacy/page.tsx create mode 100644 src/app/readers/profile/sign-out/page.tsx create mode 100644 src/app/readers/stats-and-achievements/page.tsx rename src/app/{reader-dashboard => readers}/transactions/page.tsx (100%) rename src/app/{reader-dashboard => readers}/transactions/transaction-details.tsx (100%) rename src/app/{reader-dashboard => readers}/wishlist/page.tsx (100%) rename src/app/{writer-dashboard => writers}/analytics/page.tsx (100%) create mode 100644 src/app/writers/components/notification-detail.tsx rename src/app/{writer-dashboard => writers}/earnings/page.tsx (86%) create mode 100644 src/app/writers/feedback/page.tsx create mode 100644 src/app/writers/layout.tsx rename src/app/{writer-dashboard => writers}/manage-content/BookContentStep.tsx (100%) create mode 100644 src/app/writers/manage-content/BookCreationFlow.tsx rename src/app/{writer-dashboard => writers}/manage-content/BookDetailsStep.tsx (100%) rename src/app/{writer-dashboard => writers}/manage-content/ContributorDetailsModal.tsx (100%) create mode 100644 src/app/writers/manage-content/ContributorTypeModal.tsx rename src/app/{writer-dashboard => writers}/manage-content/Manage-content.tsx (100%) rename src/app/{writer-dashboard => writers}/manage-content/PreviewModal.tsx (100%) rename src/app/{writer-dashboard => writers}/manage-content/PricingStep.tsx (100%) create mode 100644 src/app/writers/manage-content/ProgressStepper.tsx rename src/app/{writer-dashboard => writers}/manage-content/PublishTypeModal.tsx (100%) rename src/app/{writer-dashboard => writers}/manage-content/PublishingNft/Pricing.tsx (100%) rename src/app/{writer-dashboard => writers}/manage-content/PublishingNft/bookContent.tsx (100%) rename src/app/{writer-dashboard => writers}/manage-content/PublishingNft/bookDetail.tsx (100%) create mode 100644 src/app/writers/manage-content/PublishingNft/genre.tsx create mode 100644 src/app/writers/manage-content/PublishingNft/page.tsx create mode 100644 src/app/writers/manage-content/StepIndicator.tsx rename src/app/{writer-dashboard => writers}/manage-content/SuccessModal.tsx (100%) rename src/app/{writer-dashboard => writers}/manage-content/book-preview-modal.tsx (100%) create mode 100644 src/app/writers/manage-content/example.tsx create mode 100644 src/app/writers/manage-content/loading.tsx create mode 100644 src/app/writers/manage-content/page.tsx rename src/app/{writer-dashboard => writers}/notifications/notification-detail.tsx (100%) create mode 100644 src/app/writers/notifications/page.tsx create mode 100644 src/app/writers/page.tsx create mode 100644 src/app/writers/profile/component/ProfileForm.tsx create mode 100644 src/app/writers/profile/component/Social.tsx create mode 100644 src/app/writers/profile/component/UpdatePasswordForm.tsx create mode 100644 src/app/writers/profile/component/genre.tsx create mode 100644 src/app/writers/profile/component/profileHeader.tsx rename src/app/{writer-dashboard => writers}/profile/component/profilesidebar.tsx (100%) create mode 100644 src/app/writers/profile/genre/page.tsx create mode 100644 src/app/writers/profile/layout.tsx create mode 100644 src/app/writers/profile/page.tsx create mode 100644 src/app/writers/profile/password/page.tsx create mode 100644 src/app/writers/profile/social/page.tsx rename src/components/{ dashboard-earnings => dashboard-earnings}/Chart.tsx (100%) rename src/components/{ dashboard-earnings => dashboard-earnings}/EarningSummary.tsx (100%) rename src/components/{ dashboard-earnings => dashboard-earnings}/FilterBar.tsx (100%) rename src/components/{ dashboard-earnings => dashboard-earnings}/LinkWallet.tsx (100%) rename src/components/{ dashboard-earnings => dashboard-earnings}/LoanRow.tsx (100%) rename src/components/{ dashboard-earnings => dashboard-earnings}/MobileLoanRow.tsx (100%) rename src/components/{ dashboard-earnings => dashboard-earnings}/MobileTable.tsx (100%) rename src/components/{ dashboard-earnings => dashboard-earnings}/RequestPaymentModal.tsx (100%) rename src/components/{ dashboard-earnings => dashboard-earnings}/RevenueBreakdown.tsx (100%) rename src/components/{ dashboard-earnings => dashboard-earnings}/TransactionHistory.tsx (100%) rename src/components/{ dashboard-earnings => dashboard-earnings}/TransactionModalButton.tsx (100%) rename src/components/{ dashboard-earnings => dashboard-earnings}/TransactionTable.tsx (100%) diff --git a/src/app/dashboard/admin/analytics/page.tsx b/src/app/dashboard/admin/analytics/page.tsx new file mode 100644 index 0000000..07b5e9e --- /dev/null +++ b/src/app/dashboard/admin/analytics/page.tsx @@ -0,0 +1,18 @@ +"use-client"; +import { Header } from "@/components/dashboard/header"; + +export default function Analytics() { + return ( + <> +
+
+
+

Analytics

+

+ Welcome to Analytics +

+
+
+ + ); +} diff --git a/src/app/dashboard/admin/community-and-events/page.tsx b/src/app/dashboard/admin/community-and-events/page.tsx new file mode 100644 index 0000000..d958673 --- /dev/null +++ b/src/app/dashboard/admin/community-and-events/page.tsx @@ -0,0 +1,18 @@ +"use-client"; +import { Header } from "@/components/dashboard/header"; + +export default function CommunityAndEvents() { + return ( + <> +
+
+
+

Community and events

+

+ Welcome to Community and Events section of the admin dashboard! Here, you can manage community interactions, events, and engagement activities. This space is designed to help you foster a vibrant community around your platform, ensuring that users have a place to connect, share, and participate in events. +

+
+
+ + ); +} diff --git a/src/app/dashboard/admin/components/admin-sidenavbar.tsx b/src/app/dashboard/admin/components/admin-sidenavbar.tsx new file mode 100644 index 0000000..cb180bf --- /dev/null +++ b/src/app/dashboard/admin/components/admin-sidenavbar.tsx @@ -0,0 +1,84 @@ +"use client"; + +import { LayoutDashboard, Users2, FileText, BarChart3, CalendarDays, Bell, MessagesSquare } from 'lucide-react'; + +import Link from "next/link"; +import { usePathname } from "next/navigation"; + +export function Sidebar() { + const pathname = usePathname(); + + const navItems = [ + { + icon: LayoutDashboard, + label: "Dashboard", + href: "/dashboard/admin", + }, + { + icon: Users2, + label: "User Management", + href: "/dashboard/admin/user-management", + }, + { + icon: FileText, + label: "Content Management", + href: "/dashboard/admin/content-management", + }, + { + icon: BarChart3, + label: "Analytics", + href: "/dashboard/admin/analytics", + }, + { + icon: CalendarDays, + label: "Trasactions", + href: "/dashboard/admin/transactions", + }, + + { + icon: Bell, + label: "Notification", + href: "/dashboard/admin/notifications", + }, + { + icon: MessagesSquare, + label: "Community and Events", + href: "/dashboard/admin/community-and-events", + }, + + ]; + + return ( +
+
+
+ C +
+ ChainLib +
+ + +
+ ); +} diff --git a/src/app/dashboard/admin/content-management/page.tsx b/src/app/dashboard/admin/content-management/page.tsx new file mode 100644 index 0000000..82dd63d --- /dev/null +++ b/src/app/dashboard/admin/content-management/page.tsx @@ -0,0 +1,18 @@ +"use-client"; +import { Header } from "@/components/dashboard/header"; + +export default function ContentManagement() { + return ( + <> +
+
+
+

Content management

+

+ Welcome to the Content Management section of the admin dashboard! Here, you can manage all aspects of content on your platform, including articles, blogs, and other media. This space is designed to help you maintain a rich and engaging content library for your users. +

+
+
+ + ); +} diff --git a/src/app/dashboard/admin/layout.tsx b/src/app/dashboard/admin/layout.tsx new file mode 100644 index 0000000..bf55f54 --- /dev/null +++ b/src/app/dashboard/admin/layout.tsx @@ -0,0 +1,26 @@ + + + +import type React from "react"; +import { Sidebar } from "./components/admin-sidenavbar"; +import "@/app/globals.css"; + + +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + +
+ +
+ {children} +
+
+ + + ); +} \ No newline at end of file diff --git a/src/app/dashboard/admin/notifications/page.tsx b/src/app/dashboard/admin/notifications/page.tsx new file mode 100644 index 0000000..f67e4f6 --- /dev/null +++ b/src/app/dashboard/admin/notifications/page.tsx @@ -0,0 +1,18 @@ +"use-client"; +import { Header } from "@/components/dashboard/header"; + +export default function Notifications() { + return ( + <> +
+
+
+

Notification

+

+ Welcome to the Notification section of the admin dashboard! Here, you can manage all aspects of notifications on your platform, including user alerts, system messages, and other important communications. This space is designed to help you keep users informed and engaged with timely updates and announcements. +

+
+
+ + ); +} diff --git a/src/app/dashboard/admin/page.tsx b/src/app/dashboard/admin/page.tsx new file mode 100644 index 0000000..65d5686 --- /dev/null +++ b/src/app/dashboard/admin/page.tsx @@ -0,0 +1,18 @@ +"use-client"; +import { Header } from "@/components/dashboard/header"; + +export default function DashboardHome() { + return ( + <> +
+
+
+

Admin Dashboard

+

+ Welcome to your personalized admin space! +

+
+
+ + ); +} diff --git a/src/app/dashboard/admin/transactions/page.tsx b/src/app/dashboard/admin/transactions/page.tsx new file mode 100644 index 0000000..859f205 --- /dev/null +++ b/src/app/dashboard/admin/transactions/page.tsx @@ -0,0 +1,18 @@ +"use-client"; +import { Header } from "@/components/dashboard/header"; + +export default function Transactions() { + return ( + <> +
+
+
+

Transactions

+

+ Welcome to Transactions section of the admin dashboard! Here, you can manage and monitor all transactions on your platform. This space is designed to help you ensure the integrity and security of financial activities, providing insights into transaction history, status, and details. You can also handle any issues related to transactions efficiently. +

+
+
+ + ); +} diff --git a/src/app/dashboard/admin/user-management/page.tsx b/src/app/dashboard/admin/user-management/page.tsx new file mode 100644 index 0000000..627536d --- /dev/null +++ b/src/app/dashboard/admin/user-management/page.tsx @@ -0,0 +1,18 @@ +"use-client"; +import { Header } from "@/components/dashboard/header"; + +export default function UserManagment() { + return ( + <> +
+
+
+

User Management

+

+ Welcome to user management section of the admin dashboard! Here, you can manage all aspects of user accounts, including registration, profiles, and permissions. This space is designed to help you maintain a secure and organized user base, ensuring that users have the appropriate access and capabilities within your platform. +

+
+
+ + ); +} diff --git a/src/app/dashboard/readers/components/book-modal.tsx b/src/app/dashboard/readers/components/book-modal.tsx new file mode 100644 index 0000000..b83fb23 --- /dev/null +++ b/src/app/dashboard/readers/components/book-modal.tsx @@ -0,0 +1,248 @@ +"use client" + +import { ArrowLeft, MoreHorizontal, Star, X } from "lucide-react" +import Image from "next/image" +import { useEffect, useState } from "react" +import { BookReaderModal } from "./book-reader-modal" +import imgbook from "../../../../../public/Cover.png" +import imgbook1 from "../../../../../public/user1.svg" +interface BookModalProps { + book: { + id: string + title: string + author: string + rating: number + status: "read" | "unread" | "progress" + progress?: number + isNFT?: boolean + likes?: number + verified?: boolean + } + onClose: () => void +} + +export function BookModal({ book, onClose }: BookModalProps) { + // Close modal on escape key + useEffect(() => { + const handleEscape = (e: KeyboardEvent) => { + if (e.key === "Escape") { + onClose() + } + } + document.addEventListener("keydown", handleEscape) + return () => document.removeEventListener("keydown", handleEscape) + }, [onClose]) + + // Prevent body scroll when modal is open + useEffect(() => { + document.body.style.overflow = "hidden" + return () => { + document.body.style.overflow = "unset" + } + }, []) + + const [isReaderOpen, setIsReaderOpen] = useState(false) + + const openReader = () => { + setIsReaderOpen(true) + } + + const closeReader = () => { + setIsReaderOpen(false) + } + + return ( +
+
+ {/* Header */} +
+
+ +

Native Invisible

+
+ +
+
+ Joseph Yanum +
+
+ Joseph Yanum +
+ +
+
+
@joeyanum
+
+
+ + +
+
+ + {/* Main Content */} +
+ {/* Book Info Section */} +
+ {/* Book Cover */} +
+ {book.title} +
+ + {/* Book Details */} +
+

{book.title}

+
+ By {book.author} + {book.verified && ( +
+ +
+ )} +
+ + {/* Rating */} +
+
+ + {book.rating} +
+ of 109 Review +
+ + {/* Access Type */} +
+
Access Type
+
One-time Purchase
+
+ + {/* Reading Progress */} + {book.status === "progress" && book.progress && ( +
+ + {book.progress}% Read + +
+ )} + + {/* Continue Reading Button */} + +
+
+ + {/* Description */} +
+

Description

+

+ "Native Invisibility" delves into the complex and often insidious ways in which indigenous peoples and + their unique experiences are rendered unseen and unheard in the modern era. +

+ +
+ + {/* Book Details Grid */} +
+
+
Genre(s)
+
Fiction
+
Comic
+
+
+
Page count
+
21 Pages
+
+
+
Language
+
English
+
+
+
Date published
+
12 April, 2025
+
+
+ + {/* ISBN */} +
+
ISBN
+
978-3-16-148410-0
+
+ + {/* From Publisher & About Author */} +
+ {/* From the Publisher */} +
+

From the Publisher

+

+ Native Invisibility unveils the crucial ways indigenous cultures are often unseen in our modern world. + This vital book fosters understanding and action for recognition and justice. +

+
+ + {/* About the Author */} +
+

About the Author

+
+ {book.author} +
+
+
+ {book.author} + {book.verified && ( +
+ +
+ )} +
+ +
+
+
+

+ Darrin Collins is a dedicated researcher and writer deeply committed to exploring issues of cultural + visibility, marginalization, and the intersection of identity and technology. His work in Native + Invisibility reflects a long-standing interest in amplifying underrepresented voices and fostering a + more equitable understanding of diverse experiences in the contemporary world. +

+
+
+
+ {/* Book Reader Modal */} + {isReaderOpen && } +
+
+ ) +} diff --git a/src/app/reader-dashboard/components/book-reader-modal.tsx b/src/app/dashboard/readers/components/book-reader-modal.tsx similarity index 100% rename from src/app/reader-dashboard/components/book-reader-modal.tsx rename to src/app/dashboard/readers/components/book-reader-modal.tsx diff --git a/src/app/dashboard/readers/components/header-reader.tsx b/src/app/dashboard/readers/components/header-reader.tsx new file mode 100644 index 0000000..40c0e22 --- /dev/null +++ b/src/app/dashboard/readers/components/header-reader.tsx @@ -0,0 +1,50 @@ +import { Bell } from "lucide-react"; +import Image from "next/image"; +import user from "../../../../../public/user1.svg"; +import check from "../../../../../public/check.svg"; +import Logo from "../../../../../public/logo.svg"; + +export function HeaderReader() { + return ( + +
+ {/* Left Side - Logo */} +
+ Brand logo +
+ + {/* Right Side - Notification and User */} +
+
+ +
+
+
+ Profile +
+
+
+ Joseph Yanum + Verified +
+ @joeyyanum +
+
+
+ ); +} + + + diff --git a/src/app/dashboard/readers/components/reader-side-navbar.tsx b/src/app/dashboard/readers/components/reader-side-navbar.tsx new file mode 100644 index 0000000..aae223c --- /dev/null +++ b/src/app/dashboard/readers/components/reader-side-navbar.tsx @@ -0,0 +1,108 @@ +"use client"; + +import { + Bell, + BookOpen, + LayoutDashboard, + MessageSquare, + DoorClosed, + User, + ClipboardList, + Heart +} from "lucide-react"; +import Link from "next/link"; +import { usePathname } from "next/navigation"; + +export function Sidebar() { + const pathname = usePathname(); + + const navItems = [ + { + icon: LayoutDashboard, + label: "Dashboard", + href: "/dashboard/readers", + }, + { + icon: BookOpen, + label: "My Library", + href: "/dashboard/readers/library", + }, + { + icon: DoorClosed, + label: "Reading Stats", + href: "/dashboard/readers/reading-stats", + }, + { + icon: Heart, + label: "Wishlist", + href: "/dashboard/readers/wishlist", + badge: 4, + }, + { + icon: ClipboardList, + label: "Trasactions", + href: "/dashboard/readers/transactions", + }, + { + icon: MessageSquare, + label: "Discussion & Clubs", + href: "/dashboard/readers/discussions-and-clubs", + }, + { + icon: Bell, + label: "Notification", + href: "/dashboard/readers/notifications", + }, + { + icon: User, + label: "Profile", + href: "/dashboard/readers/profile", + }, + + ]; + + return ( +
+
+
+ C +
+ ChainLib +
+ + +
+ ); +} diff --git a/src/app/reader-dashboard/discussions-and-clubs/ClubCard.tsx b/src/app/dashboard/readers/discussions-and-clubs/ClubCard.tsx similarity index 100% rename from src/app/reader-dashboard/discussions-and-clubs/ClubCard.tsx rename to src/app/dashboard/readers/discussions-and-clubs/ClubCard.tsx diff --git a/src/app/reader-dashboard/discussions-and-clubs/[id]/page.tsx b/src/app/dashboard/readers/discussions-and-clubs/[id]/page.tsx similarity index 100% rename from src/app/reader-dashboard/discussions-and-clubs/[id]/page.tsx rename to src/app/dashboard/readers/discussions-and-clubs/[id]/page.tsx diff --git a/src/app/reader-dashboard/discussions-and-clubs/components/AddGuest.tsx b/src/app/dashboard/readers/discussions-and-clubs/components/AddGuest.tsx similarity index 100% rename from src/app/reader-dashboard/discussions-and-clubs/components/AddGuest.tsx rename to src/app/dashboard/readers/discussions-and-clubs/components/AddGuest.tsx diff --git a/src/app/reader-dashboard/discussions-and-clubs/components/ClubDetails.tsx b/src/app/dashboard/readers/discussions-and-clubs/components/ClubDetails.tsx similarity index 100% rename from src/app/reader-dashboard/discussions-and-clubs/components/ClubDetails.tsx rename to src/app/dashboard/readers/discussions-and-clubs/components/ClubDetails.tsx diff --git a/src/app/reader-dashboard/discussions-and-clubs/components/ClubDiscussion.tsx b/src/app/dashboard/readers/discussions-and-clubs/components/ClubDiscussion.tsx similarity index 100% rename from src/app/reader-dashboard/discussions-and-clubs/components/ClubDiscussion.tsx rename to src/app/dashboard/readers/discussions-and-clubs/components/ClubDiscussion.tsx diff --git a/src/app/reader-dashboard/discussions-and-clubs/components/ClubToolBar.tsx b/src/app/dashboard/readers/discussions-and-clubs/components/ClubToolBar.tsx similarity index 100% rename from src/app/reader-dashboard/discussions-and-clubs/components/ClubToolBar.tsx rename to src/app/dashboard/readers/discussions-and-clubs/components/ClubToolBar.tsx diff --git a/src/app/reader-dashboard/discussions-and-clubs/components/CreateEvent.tsx b/src/app/dashboard/readers/discussions-and-clubs/components/CreateEvent.tsx similarity index 100% rename from src/app/reader-dashboard/discussions-and-clubs/components/CreateEvent.tsx rename to src/app/dashboard/readers/discussions-and-clubs/components/CreateEvent.tsx diff --git a/src/app/reader-dashboard/discussions-and-clubs/components/Modal.tsx b/src/app/dashboard/readers/discussions-and-clubs/components/Modal.tsx similarity index 100% rename from src/app/reader-dashboard/discussions-and-clubs/components/Modal.tsx rename to src/app/dashboard/readers/discussions-and-clubs/components/Modal.tsx diff --git a/src/app/reader-dashboard/discussions-and-clubs/components/ScheduleEvent.tsx b/src/app/dashboard/readers/discussions-and-clubs/components/ScheduleEvent.tsx similarity index 100% rename from src/app/reader-dashboard/discussions-and-clubs/components/ScheduleEvent.tsx rename to src/app/dashboard/readers/discussions-and-clubs/components/ScheduleEvent.tsx diff --git a/src/app/reader-dashboard/discussions-and-clubs/components/StartEvent.tsx b/src/app/dashboard/readers/discussions-and-clubs/components/StartEvent.tsx similarity index 100% rename from src/app/reader-dashboard/discussions-and-clubs/components/StartEvent.tsx rename to src/app/dashboard/readers/discussions-and-clubs/components/StartEvent.tsx diff --git a/src/app/reader-dashboard/discussions-and-clubs/components/SuccessModal.tsx b/src/app/dashboard/readers/discussions-and-clubs/components/SuccessModal.tsx similarity index 100% rename from src/app/reader-dashboard/discussions-and-clubs/components/SuccessModal.tsx rename to src/app/dashboard/readers/discussions-and-clubs/components/SuccessModal.tsx diff --git a/src/app/reader-dashboard/discussions-and-clubs/page.tsx b/src/app/dashboard/readers/discussions-and-clubs/page.tsx similarity index 100% rename from src/app/reader-dashboard/discussions-and-clubs/page.tsx rename to src/app/dashboard/readers/discussions-and-clubs/page.tsx diff --git a/src/app/dashboard/readers/layout.tsx b/src/app/dashboard/readers/layout.tsx new file mode 100644 index 0000000..dd5bd25 --- /dev/null +++ b/src/app/dashboard/readers/layout.tsx @@ -0,0 +1,26 @@ + + + +import type React from "react"; +import { Sidebar } from "./components/reader-side-navbar"; +import "@/app/globals.css"; + + +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + +
+ +
+ {children} +
+
+ + + ); +} \ No newline at end of file diff --git a/src/app/dashboard/readers/library/page.tsx b/src/app/dashboard/readers/library/page.tsx new file mode 100644 index 0000000..1840361 --- /dev/null +++ b/src/app/dashboard/readers/library/page.tsx @@ -0,0 +1,898 @@ +"use client"; + +import type React from "react"; +import { useState } from "react"; +import { + Search, + ChevronDown, + BookOpen, + Users, + Bookmark, + CheckCircle, + Clock, + Eye, +} from "lucide-react"; +import Image from "next/image"; +import { BookModal } from "../components/book-modal"; +import imgbook from "../../../../../public/Cover.png"; +import { Header } from "@/components/dashboard/header"; + + +interface StatCard { + title: string; + value: number; + icon: React.ReactNode; + color: string; +} + +interface Book { + id: string; + title: string; + author: string; + rating: number; + status: "read" | "unread" | "progress"; + progress?: number; + isNFT?: boolean; + likes?: number; + verified?: boolean; +} + +interface Collection { + id: string; + title: string; + rating: number; + likes: number; + owners: number; + books: string[]; +} + +const statCards: StatCard[] = [ + { + title: "Total Books", + value: 24, + icon: , + color: "bg-blue-100 text-blue-600", + }, + { + title: "Regular Book", + value: 12, + icon: , + color: "bg-green-100 text-green-600", + }, + { + title: "NTF Editions", + value: 4, + icon: , + color: "bg-purple-100 text-purple-600", + }, + { + title: "Series", + value: 8, + icon: , + color: "bg-orange-100 text-orange-600", + }, + { + title: "Collections", + value: 3, + icon: , + color: "bg-indigo-100 text-indigo-600", + }, + { + title: "Read", + value: 3, + icon: , + color: "bg-blue-100 text-blue-600", + }, + { + title: "Progress", + value: 3, + icon: , + color: "bg-blue-100 text-blue-600", + }, + { + title: "Unread", + value: 3, + icon: , + color: "bg-blue-100 text-blue-600", + }, +]; + +const recentBooks: Book[] = [ + { + id: "1", + title: "Native Invisibility", + author: "Darrin Collins", + rating: 4.5, + status: "progress", + progress: 5, + verified: true, + }, + { + id: "2", + title: "Peace and Hate", + author: "Darrin Collins", + rating: 4.5, + status: "unread", + isNFT: true, + verified: true, + }, + { + id: "3", + title: "Dark World", + author: "Darrin Collins", + rating: 4.5, + status: "unread", + likes: 5, + verified: true, + }, + { + id: "4", + title: "Native Invisibility", + author: "Darrin Collins", + rating: 4.5, + status: "progress", + progress: 5, + verified: true, + }, +]; + +const regularBooks: Book[] = [ + { + id: "5", + title: "Native Invisibility", + author: "Darrin Collins", + rating: 4.5, + status: "progress", + progress: 5, + verified: true, + }, + { + id: "6", + title: "Native Invisibility", + author: "Darrin Collins", + rating: 4.5, + status: "read", + verified: true, + }, + { + id: "7", + title: "Native Invisibility", + author: "Darrin Collins", + rating: 4.5, + status: "unread", + verified: true, + }, + { + id: "8", + title: "Native Invisibility", + author: "Darrin Collins", + rating: 4.5, + status: "read", + verified: true, + }, +]; + +const nftBooks: Book[] = [ + { + id: "9", + title: "Peace and Hate", + author: "Darrin Collins", + rating: 4.5, + status: "progress", + progress: 97, + isNFT: true, + verified: true, + }, + { + id: "10", + title: "Peace and Hate", + author: "Darrin Collins", + rating: 4.5, + status: "read", + isNFT: true, + verified: true, + }, + { + id: "11", + title: "Peace and Hate", + author: "Darrin Collins", + rating: 4.5, + status: "unread", + isNFT: true, + verified: true, + }, + { + id: "12", + title: "Peace and Hate", + author: "Darrin Collins", + rating: 4.5, + status: "unread", + isNFT: true, + verified: true, + }, +]; + +const seriesBooks: Book[] = [ + { + id: "13", + title: "Love at Night", + author: "Darrin Collins", + rating: 4.5, + status: "read", + likes: 4, + verified: true, + }, + { + id: "14", + title: "Love at Night", + author: "Darrin Collins", + rating: 4.5, + status: "progress", + progress: 46, + likes: 5, + verified: true, + }, + { + id: "15", + title: "Dark World", + author: "Darrin Collins", + rating: 4.5, + status: "unread", + likes: 5, + verified: true, + }, + { + id: "16", + title: "Peace and Hate", + author: "Darrin Collins", + rating: 4.5, + status: "progress", + progress: 79, + likes: 5, + verified: true, + }, +]; + +const collections: Collection[] = [ + { + id: "1", + title: "My Best Boook", + rating: 4.5, + likes: 5, + owners: 10, + books: ["book1", "book2", "book3"], + }, + { + id: "2", + title: "My Best Boook", + rating: 4.5, + likes: 5, + owners: 10, + books: ["book1", "book2", "book3"], + }, + { + id: "3", + title: "My Best Boook", + rating: 4.5, + likes: 5, + owners: 10, + books: ["book1", "book2", "book3"], + }, + { + id: "4", + title: "My Best Boook", + rating: 4.5, + likes: 5, + owners: 10, + books: ["book1", "book2", "book3"], + }, +]; + +export default function BookLibraryDashboard() { + const [searchQuery, setSearchQuery] = useState(""); + const [bookType, setBookType] = useState("Book Type"); + const [genre, setGenre] = useState("Genre"); + const [bookTypeOpen, setBookTypeOpen] = useState(false); + const [genreOpen, setGenreOpen] = useState(false); + + const [selectedBook, setSelectedBook] = useState(null); + const [isModalOpen, setIsModalOpen] = useState(false); + + const openBookModal = (book: Book) => { + setSelectedBook(book); + setIsModalOpen(true); + }; + + const closeBookModal = () => { + setSelectedBook(null); + setIsModalOpen(false); + }; + + return ( + <> +
+
+
+ {/* Search and Filters */} +
+
+ + setSearchQuery(e.target.value)} + className="w-full pl-10 h-12 bg-white border border-gray-200 rounded-xl px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent" + /> +
+ +
+ {/* Book Type Dropdown */} +
+ + {bookTypeOpen && ( +
+ + + +
+ )} +
+ + {/* Genre Dropdown */} +
+ + {genreOpen && ( +
+ + + + +
+ )} +
+
+
+ + {/* Statistics Cards */} +
+ {statCards.map((card, index) => ( +
+
+
+ {card.icon} +
+
+
+

+ {card.title} +

+

+ {card.value} +

+
+
+ ))} +
+ + {/* Recently Purchased Section */} +
+
+

+ Recently Purchased +

+ +
+ +
+ {recentBooks.map((book) => ( +
openBookModal(book)} + className="bg-white border border-gray-200 rounded-xl shadow-sm hover:shadow-md transition-shadow overflow-hidden cursor-pointer" + > +
+
+ {book.title} +
+ + {/* Status Badges */} +
+ {book.status === "progress" && book.progress && ( + + {book.progress}% Read + + )} + {book.status === "unread" && ( + + Unread + + )} + {book.isNFT && ( + + NFT + + )} +
+
+ +
+

+ {book.title} +

+
+

By {book.author}

+ {book.verified && ( +
+ +
+ )} +
+ +
+
+
+ {Array.from( + { length: Math.floor(book.rating) }, + (_, i) => ( + + ) + )} +
+ + {book.rating} + +
+ + {book.likes && ( +
+ {book.likes} +
+ )} +
+
+
+ ))} +
+
+ + {/* Regular Books Section */} +
+
+

+ Regular Books +

+ +
+ +
+ {regularBooks.map((book) => ( +
openBookModal(book)} + className="bg-white border border-gray-200 rounded-xl shadow-sm hover:shadow-md transition-shadow overflow-hidden cursor-pointer" + > +
+
+ {book.title} +
+ + {/* Status Badges */} +
+ {book.status === "progress" && book.progress && ( + + {book.progress}% Read + + )} + {book.status === "read" && ( + + Completed + + )} + {book.status === "unread" && ( + + Unread + + )} +
+
+ +
+

+ {book.title} +

+
+

By {book.author}

+ {book.verified && ( +
+ +
+ )} +
+ +
+
+
+ {Array.from( + { length: Math.floor(book.rating) }, + (_, i) => ( + + ) + )} +
+ + {book.rating} + +
+
+
+
+ ))} +
+
+ + {/* NFT Edition Section */} +
+
+

NFT Edition

+ +
+ +
+ {nftBooks.map((book) => ( +
openBookModal(book)} + className="bg-white border border-gray-200 rounded-xl shadow-sm hover:shadow-md transition-shadow overflow-hidden cursor-pointer" + > +
+
+ {book.title} +
+ + {/* Status Badges */} +
+ {book.status === "progress" && book.progress && ( + + {book.progress}% Read + + )} + {book.status === "read" && ( + + Completed + + )} + {book.status === "unread" && ( + + Unread + + )} + {book.isNFT && ( + + NFT + + )} +
+
+ +
+

+ {book.title} +

+
+

By {book.author}

+ {book.verified && ( +
+ +
+ )} +
+ +
+
+
+ {Array.from( + { length: Math.floor(book.rating) }, + (_, i) => ( + + ) + )} +
+ + {book.rating} + +
+
+
+
+ ))} +
+
+ + {/* Series Section */} +
+
+

Series

+ +
+ +
+ {seriesBooks.map((book) => ( +
openBookModal(book)} + className="bg-white border border-gray-200 rounded-xl shadow-sm hover:shadow-md transition-shadow overflow-hidden cursor-pointer" + > +
+
+ {book.title} +
+ + {/* Status Badges */} +
+ {book.status === "progress" && book.progress && ( + + {book.progress}% Read + + )} + {book.status === "read" && ( + + Completed + + )} + {book.status === "unread" && ( + + Unread + + )} +
+
+ +
+

+ {book.title} +

+
+

By {book.author}

+ {book.verified && ( +
+ +
+ )} +
+ +
+
+
+ {Array.from( + { length: Math.floor(book.rating) }, + (_, i) => ( + + ) + )} +
+ + {book.rating} + +
+ + {book.likes && ( +
+ {book.likes} +
+ )} +
+
+
+ ))} +
+
+ + {/* Collections Section */} +
+
+

+ Collections +

+ +
+ +
+ {collections.map((collection) => ( +
+ {/* Collection Books Grid */} +
+
+ {/* Top row - 2 books */} +
+ Book cover +
+
+ Book cover +
+ {/* Bottom row - 1 book + Add More */} +
+ Book cover +
+
+ + + Add More + +
+
+ +
+

+ {collection.title} +

+ +
+
+
+ {Array.from( + { length: Math.floor(collection.rating) }, + (_, i) => ( + + ) + )} +
+ + {collection.rating} + +
+ +
+
+ {collection.likes} +
+
+
+ + {collection.owners} + +
+ Owners +
+
+
+
+
+
+ ))} +
+
+ {/* Book Modal */} + {isModalOpen && selectedBook && ( + + )} +
+
+ + ); +} diff --git a/src/app/dashboard/readers/notifications/notification-detail.tsx b/src/app/dashboard/readers/notifications/notification-detail.tsx new file mode 100644 index 0000000..7cb4454 --- /dev/null +++ b/src/app/dashboard/readers/notifications/notification-detail.tsx @@ -0,0 +1,66 @@ +"use client"; + +import { MoveLeft, Trash2 } from "lucide-react"; +import Image from "next/image"; +import soon from "../../../../../public/coming-soon.png" + + +interface NotificationDetailPageProps { + back: () => void; +} + +export function NotificationDetailPage({ back }: NotificationDetailPageProps) { + return ( +
+ {/* Content */} +
+
+
+
+
+ +
+
+ +
+
+
+

+ New Update for Writers +

+

+ Step up your writing with our latest update +

+ + +
+ Notification Banner +
+ +
+

+ Compete against players worldwide, climb the global rankings, + and prove your skills. Test your strategy, outmaneuver your + opponents, and claim your place at the top. Glory awaits! +

+
+ +
+

Sent; Today 12:18 PM

+
+
+
+
+
+
+ ); +} diff --git a/src/app/reader-dashboard/notifications/page.tsx b/src/app/dashboard/readers/notifications/page.tsx similarity index 100% rename from src/app/reader-dashboard/notifications/page.tsx rename to src/app/dashboard/readers/notifications/page.tsx diff --git a/src/app/dashboard/readers/page.tsx b/src/app/dashboard/readers/page.tsx new file mode 100644 index 0000000..83e8438 --- /dev/null +++ b/src/app/dashboard/readers/page.tsx @@ -0,0 +1,18 @@ +"use-client"; +import { Header } from "@/components/dashboard/header"; + +export default function DashboardHome() { + return ( + <> +
+
+
+

Reader Dashboard

+

+ Welcome to your personalized reading space! +

+
+
+ + ); +} diff --git a/src/app/reader-dashboard/profile/following/page.tsx b/src/app/dashboard/readers/profile/following/page.tsx similarity index 100% rename from src/app/reader-dashboard/profile/following/page.tsx rename to src/app/dashboard/readers/profile/following/page.tsx diff --git a/src/app/dashboard/readers/profile/layout.tsx b/src/app/dashboard/readers/profile/layout.tsx new file mode 100644 index 0000000..b62ab57 --- /dev/null +++ b/src/app/dashboard/readers/profile/layout.tsx @@ -0,0 +1,121 @@ +"use client"; +import React, { useState } from "react"; +import { X } from "lucide-react"; +import { usePathname, useRouter } from "next/navigation"; +import Link from "next/link"; +import { MobileMenuContext } from "@/hooks/useMobileMenu"; +import NavBar from "@/components/landingpage/NavBar"; + +interface ReaderProfileLayoutProps { + children: React.ReactNode; +} + +export default function ReaderProfileLayout({ + children, +}: ReaderProfileLayoutProps) { + const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); + const pathname = usePathname(); + const router = useRouter(); + + const navItems = [ + { + label: "Profile Details", + href: "/dashboard/readers/profile", + }, + { + label: "Following", + href: "/dashboard/readers/profile/following", + }, + { + label: "Preferences", + href: "/dashboard/readers/profile/preferences", + }, + { + label: "Privacy Settings", + href: "/dashboard/readers/profile/privacy", + }, + { + label: "Sign Out", + href: "/dashboard/readers/profile/sign-out", + }, + ]; + + return ( + setIsMobileMenuOpen(true) }} + > +
+ +
+ {/* Desktop Sidebar */} +
+
+ +
+
+ + {/* Mobile Menu Overlay */} +
setIsMobileMenuOpen(false)} + > + {/* Mobile Menu Panel */} +
e.stopPropagation()} + > +
+

Profile

+ +
+ +
+
+ + {/* Main Content */} +
{children}
+
+
+
+ ); +} diff --git a/src/app/dashboard/readers/profile/page.tsx b/src/app/dashboard/readers/profile/page.tsx new file mode 100644 index 0000000..2ddf229 --- /dev/null +++ b/src/app/dashboard/readers/profile/page.tsx @@ -0,0 +1,264 @@ +"use client"; + +import type React from "react"; + +import { useState, useRef, type ChangeEvent } from "react"; +import Image from "next/image"; +import { ArrowLeft } from "lucide-react"; +import { useRouter } from "next/navigation"; +import { useMobileMenu } from "@/hooks/useMobileMenu"; +import { Header } from "@/components/dashboard/header"; +interface ProfileFormData { + firstName: string; + lastName: string; + username: string; + email: string; + bio: string; + profilePicture: string | null; +} + +export default function ProfileDetailsPage() { + const router = useRouter(); + const { openMobileMenu } = useMobileMenu(); + const [formData, setFormData] = useState({ + firstName: "Faith", + lastName: "Haruna", + username: "Faith_Haruna", + email: "example@gmail.com", + bio: "", + profilePicture: null, + }); + + const [preview, setPreview] = useState( + "/reader-profile-dummy-image.png" + ); + const fileInputRef = useRef(null); + + const handleInputChange = ( + e: ChangeEvent + ) => { + const { name, value } = e.target; + setFormData((prev) => ({ + ...prev, + [name]: value, + })); + }; + + const handleImageUpload = (e: ChangeEvent) => { + const file = e.target.files?.[0]; + if (!file) return; + + const reader = new FileReader(); + reader.onload = () => { + setPreview(reader.result as string); + setFormData((prev) => ({ + ...prev, + profilePicture: reader.result as string, + })); + }; + reader.readAsDataURL(file); + }; + + const triggerFileInput = () => { + fileInputRef.current?.click(); + }; + + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault(); + console.log("Form submitted:", formData); + }; + + return ( + <> +
+
+ {/* Mobile Header */} +
+
+ +

Profile

+
+ +
+ +
+
+ {/* Profile Picture Section */} +
+
+
+ {preview ? ( + Profile Preview + ) : ( +
+ + + +
+ )} +
+ + +
+ +
+
+ {" "} +

+ {formData.username} +

+
+ + + Enthusiast + +
+
+

ID: CLRD00010

+

+ Following{" "} + 17 +

+
+
+ + {/* Form Fields */} +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+ +