From a2989bbf2bedb1aab8df634c5eb6788f94b00561 Mon Sep 17 00:00:00 2001 From: eleven-smg Date: Wed, 29 Jul 2026 00:41:29 +0100 Subject: [PATCH] chore(deps): remove unused dependencies and dead components --- .env.example | 1 - components/DebugAuthLogs.jsx | 48 -- components/atoms/dashboard/Notybell.jsx | 2 + components/molecules/dashboard/Notybell.jsx | 3 + components/molecules/errors/NotFound.jsx | 2 +- components/organisms/reels/ReelCard.jsx | 1 - components/organisms/reels/ReelFeed.jsx | 1 - lib/data.js | 530 -------------------- package-lock.json | 103 ---- package.json | 2 - 10 files changed, 6 insertions(+), 687 deletions(-) delete mode 100644 components/DebugAuthLogs.jsx diff --git a/.env.example b/.env.example index 80003045..5481ab55 100644 --- a/.env.example +++ b/.env.example @@ -4,7 +4,6 @@ NEXT_PUBLIC_CLOUDINARY_API_SECRET=your_cloudinary_api_secret NEXT_PUBLIC_CLOUDINARY_URL=your_cloudinary_url NEXT_PUBLIC_JITSI_DOMAIN=https://meet.jit.si # NODE_ENV=production -NEXT_PUBLIC_SOCKET_URL=https://dnb-backend-api.onrender.com DNB_API_URL=https://dnb-backend-api.onrender.com NEXT_PUBLIC_API_URL=https://dnb-backend-api.onrender.com NEXT_PUBLIC_STELLAR_NETWORK=testnet diff --git a/components/DebugAuthLogs.jsx b/components/DebugAuthLogs.jsx deleted file mode 100644 index 09f64b73..00000000 --- a/components/DebugAuthLogs.jsx +++ /dev/null @@ -1,48 +0,0 @@ -"use client"; -import { useState, useEffect } from "react"; - -export default function DebugAuthLogs() { - const [logs, setLogs] = useState(""); - const [isOpen, setIsOpen] = useState(false); - - useEffect(() => { - if (typeof window !== "undefined") { - const authLogs = - sessionStorage.getItem("authDebugLogs") || "No logs found"; - setLogs(authLogs); - } - }, []); - - const clearLogs = () => { - if (typeof window !== "undefined") { - sessionStorage.removeItem("authDebugLogs"); - setLogs("Logs cleared"); - } - }; - - return ( -
- - - {isOpen && ( -
-
-

Authentication Debug Logs

- -
-
{logs}
-
- )} -
- ); -} diff --git a/components/atoms/dashboard/Notybell.jsx b/components/atoms/dashboard/Notybell.jsx index 27a0b34e..f209ac31 100644 --- a/components/atoms/dashboard/Notybell.jsx +++ b/components/atoms/dashboard/Notybell.jsx @@ -1,3 +1,5 @@ +// LIVE: rendered by components/molecules/dashboard/nav-header.jsx. +// Placeholder data. See components/molecules/dashboard/Notybell.jsx for the SSE-backed bell. // components/atoms/dashboard/Notybell.jsx "use client"; diff --git a/components/molecules/dashboard/Notybell.jsx b/components/molecules/dashboard/Notybell.jsx index bfa260ea..47340992 100644 --- a/components/molecules/dashboard/Notybell.jsx +++ b/components/molecules/dashboard/Notybell.jsx @@ -1,3 +1,6 @@ +// NOT YET WIRED UP: SSE-backed bell built on hooks/useNotificationSSE.js. +// The bell currently rendered in the nav is components/atoms/dashboard/Notybell.jsx. +// Retained deliberately - this is the intended replacement, not dead code. "use client"; import React, { useState } from "react"; diff --git a/components/molecules/errors/NotFound.jsx b/components/molecules/errors/NotFound.jsx index 42b2a8fc..c31d9cea 100644 --- a/components/molecules/errors/NotFound.jsx +++ b/components/molecules/errors/NotFound.jsx @@ -19,7 +19,7 @@ const NotFoundComp = ({ if (window.history.length > 2) { router.back(); } else { - router.push(isDashboard ? "/dashboard/classes" : "/login"); + router.push(isDashboard ? "/dashboard" : "/login"); } }; diff --git a/components/organisms/reels/ReelCard.jsx b/components/organisms/reels/ReelCard.jsx index 50df4593..4a46b2fc 100644 --- a/components/organisms/reels/ReelCard.jsx +++ b/components/organisms/reels/ReelCard.jsx @@ -1,6 +1,5 @@ "use client"; -"use client"; import { useEffect, useMemo, useRef, useState } from "react"; import { diff --git a/components/organisms/reels/ReelFeed.jsx b/components/organisms/reels/ReelFeed.jsx index f4cc701b..fe00762f 100644 --- a/components/organisms/reels/ReelFeed.jsx +++ b/components/organisms/reels/ReelFeed.jsx @@ -1,6 +1,5 @@ "use client"; -"use client"; import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import Button from "@/components/atoms/form/Button"; diff --git a/lib/data.js b/lib/data.js index d1eb4101..b26dd025 100644 --- a/lib/data.js +++ b/lib/data.js @@ -1,8 +1,6 @@ import { - AudioWaveform, Blocks, Calendar, - Command, Home, Inbox, MessageCircleQuestion, @@ -16,39 +14,8 @@ import { FaSearch, FaUsers, FaGraduationCap, - FaHeart, - FaStar, } from "react-icons/fa"; -import { Book } from "lucide-react"; - -export const links = [ - { - title: "Classes", - url: "/dashboard/classes", - icon: Book, // Icon for the link - badge: "New", // Badge text - }, - { - title: "Assignments", - url: "/dashboard/assignments", - icon: Book, - badge: "Due", - }, - { - title: "Exams", - url: "/dashboard/exams", - icon: Book, - badge: "Upcoming", - }, - { - title: "Results", - url: "/dashboard/results", - icon: Book, - badge: "Updated", - }, -]; - export const data = { navMain: [ { @@ -103,332 +70,6 @@ export const data = { ], }; -export const books = [ - { - id: 1, - title: "Riyadh as-Salihin", - author: "Imam Nawawi", - category: "Hadith", - price: 0, - readCount: 120, - rating: 5.0, - image: "/images/img-2.jpeg", - }, - { - id: 2, - title: "The Fundamentals of Tawheed", - author: "Dr. Bilal Philips", - category: "Aqidah", - price: 5, - readCount: 45, - rating: 4.5, - image: "/images/img-2.jpeg", - }, - { - id: 3, - title: "In the Footsteps of the Prophet", - author: "Tariq Ramadan", - category: "Seerah", - price: 5, - readCount: 60, - rating: 2.5, - image: "/images/img-2.jpeg", - }, - { - id: 4, - title: "Fortress of the Muslim", - author: "Sa'id bin Wahf al-Qahtani", - category: "Dua", - price: 0, - readCount: 220, - rating: 5.0, - image: "/images/img-2.jpeg", - }, - { - id: 5, - title: "Don't Be Sad", - author: "Dr. Aaidh al-Qarni", - category: "Self-help", - price: 10, - readCount: 180, - rating: 4.7, - image: "/images/img-2.jpeg", - }, - { - id: 6, - title: "La Tahzan (Don't Be Sad)", - author: "Dr. Aaidh al-Qarni", - category: "Motivation", - price: 8, - readCount: 90, - rating: 4.2, - image: "/images/img-2.jpeg", - }, - { - id: 7, - title: "Stories of the Prophets", - author: "Ibn Kathir", - category: "History", - price: 0, - readCount: 150, - rating: 5.0, - image: "/images/img-2.jpeg", - }, - { - id: 8, - title: "Fiqh-us-Sunnah", - author: "Sayyid Sabiq", - category: "Fiqh", - price: 15, - readCount: 75, - rating: 4.6, - image: "/images/img-2.jpeg", - }, - { - id: 9, - title: "The Sealed Nectar", - author: "Safiyyur-Rahman al-Mubarakpuri", - category: "Seerah", - price: 12, - readCount: 210, - rating: 4.9, - image: "/images/img-2.jpeg", - }, - { - id: 10, - title: "Tafsir Ibn Kathir", - author: "Ibn Kathir", - category: "Tafsir", - price: 0, - readCount: 300, - rating: 5.0, - image: "/images/img-2.jpeg", - }, - { - id: 11, - title: "The Book of Manners", - author: "Fu'ad Ibn 'Abd Al-'Azeez Ash-Shulhoob", - category: "Akhlaq", - price: 5, - readCount: 100, - rating: 4.4, - image: "/images/img-2.jpeg", - }, - { - id: 12, - title: "The Life of Muhammad", - author: "Muhammad Husayn Haykal", - category: "Biography", - price: 10, - readCount: 95, - rating: 4.3, - image: "/images/img-2.jpeg", - }, - { - id: 13, - title: "Explanation of the Three Fundamental Principles", - author: "Shaykh Muhammad ibn Saalih al-Uthaymeen", - category: "Aqidah", - price: 6, - readCount: 55, - rating: 4.6, - image: "/images/img-2.jpeg", - }, - { - id: 14, - title: "The Creed of Imam Tahawi", - author: "Imam Abu Ja'far al-Tahawi", - category: "Aqidah", - price: 7, - readCount: 40, - rating: 4.1, - image: "/images/img-2.jpeg", - }, - { - id: 15, - title: "Purification of the Heart", - author: "Hamza Yusuf", - category: "Tazkiyah", - price: 9, - readCount: 65, - rating: 4.7, - image: "/images/img-2.jpeg", - }, - { - id: 16, - title: "The Path to Guidance", - author: "Ibn Qudamah al-Maqdisi", - category: "Spirituality", - price: 5, - id: 17, - title: "Kitab al-Tawheed", - author: "Muhammad ibn Abdul Wahhab", - category: "Aqidah", - price: 0, - readCount: 140, - rating: 4.9, - image: "/images/img-2.jpeg", - }, - { - id: 18, - title: "The Ideal Muslimah", - author: "Dr. Muhammad Ali Al-Hashimi", - category: "Women", - price: 10, - readCount: 110, - rating: 4.8, - image: "/images/img-2.jpeg", - }, - { - id: 19, - title: "The Ideal Muslim", - author: "Dr. Muhammad Ali Al-Hashimi", - category: "Men", - price: 10, - readCount: 70, - rating: 4.6, - image: "/images/img-2.jpeg", - }, - { - id: 20, - title: "Al-Adab Al-Mufrad", - author: "Imam Bukhari", - category: "Hadith", - price: 0, - readCount: 130, - rating: 5.0, - image: "/images/img-2.jpeg", - }, - { - id: 21, - title: "Signs Before the Day of Judgment", - author: "Ibn Kathir", - category: "End Times", - price: 5, - readCount: 125, - rating: 4.3, - image: "/images/img-2.jpeg", - }, - { - id: 22, - title: "A Brief Illustrated Guide to Understanding Islam", - author: "I.A. Ibrahim", - category: "Introductory", - price: 0, - readCount: 200, - rating: 4.5, - image: "/images/img-2.jpeg", - }, - { - id: 23, - title: "Enjoy Your Life", - author: "Dr. Muhammad al-Arifi", - category: "Self-help", - price: 6, - readCount: 85, - rating: 4.7, - image: "/images/img-2.jpeg", - }, -]; - -export const spaces = [ - { - id: "space001", - title: "Fiqh of Ramadan: Deep Dive", - description: "Join us for a detailed session on fasting rules & rewards.", - thumbnail: "/images/img-3.jpg", - category: "Fiqh", - status: "live", - startTime: "2025-05-23T18:00:00Z", - duration: 60, - host: { - name: "Ustadh Ali Mukhtar", - image: "/images/img-2.jpeg", - }, - }, - { - id: "space002", - title: "Understanding Zakat: Spiritual & Social Impact", - description: "Explore how Zakat purifies wealth and supports communities.", - thumbnail: "/images/img-3.jpg", - category: "Fiqh", - status: "upcoming", - startTime: "2025-05-24T16:00:00Z", - duration: 45, - host: { - name: "Ustadh Maryam Usman", - image: "/images/img-3.jpg", - }, - }, - { - id: "space003", - title: "Hadith Circle: Sahih Bukhari Selections", - description: "Reflect on hadiths and their meanings in today's world.", - thumbnail: "/images/mosque.png", - category: "Hadith", - status: "live", - startTime: "2025-05-25T20:00:00Z", - duration: 50, - host: { - name: "Ustadh Ahmad Bello", - image: "/images/book1.jpg", - }, - }, -]; - -export const usermessages = [ - { - name: "Abu Zayd", - message: " Hello, when do have the meting", - image: "/images/mosque.png", - }, - { - name: "Abdul Hazeem", - message: " Hello, when do have the meting", - image: "/images/book1.jpg", - }, - { - name: "Ibn AbdulRasaq", - message: " Hello, when do have the meting", - image: "/images/img-2.jpeg", - }, - { - name: "Muhammad Jamiu", - message: "Salamualaykum brother", - image: "/images/man.jpg", - }, - { - name: "Abdul Hazeem", - message: " Hello, when do have the meting", - image: "/images/img1.jpeg", - }, - { - name: "Abdul Samad", - message: " Hello, when do have the meting", - image: "/images/profile-setup-img.jpeg", - }, - { - name: "Faruq Sherifdeen", - message: " Hello, when do have the meting", - image: "/images/auth.jpg", - }, - { - name: "Ali Jamal", - message: " Hello, when do have the meting", - image: "/images/mosque.png", - }, - { - name: "Ali Mutmaina", - message: "Aw far, how u doing?", - image: "/images/img-4.jpg", - }, - { - name: "Raheem Fuad", - message: "Test this course for me, abeg 🙏", - image: "/images/img-3.jpg", - }, -]; - export const islamicCategories = [ { main: "Core Islamic Sciences", @@ -618,174 +259,3 @@ export const partners = [ logo: "https://logo.clearbit.com/icofa.com", }, ]; - -// "use client"; - -// import { -// Card, -// CardContent, -// CardHeader, -// CardTitle, -// } from "@/components/ui/card"; -// import { Badge } from "@/components/ui/badge"; -// import Button from "@/components/atoms/form/Button"; -// import Image from "next/image"; -// import { -// Avatar, -// AvatarFallback, -// AvatarImage, -// } from "@/components/ui/avatar"; -// import { VideoIcon, Clock } from "lucide-react"; -// import { format } from "date-fns"; - -// const SpaceCard = ({ space }) => { -// const { -// id, -// title, -// description, -// thumbnail, -// category, -// status, -// startTime, -// duration, -// host, -// } = space; - -// const formattedTime = format(new Date(startTime), "PPpp"); - -// return ( -// -// {/* Thumbnail */} -//
-// {title} -//
-// {/* Category + Status */} -//
-// {category && ( -// -// {category} -// -// )} -// {status === "live" && ( -//
-// 🟢 Live -//
-// )} -//
-//
-// {/* -// {/* New Layout: Host, Title, Description, Meta, Button */} -//
-// {/* Host */} -//
-// -// -// -// {host?.name?.slice(0, 2).toUpperCase() || "HN"} -// -// -//
-// {host?.name || "Ustadh Ahmad"} -// Host -//
-//
- -// {/* Title & Description */} -//
-// -// {title} -// -//

-// {description} -//

-//
- -// {/* Meta Info */} -//
-//
-// -// {formattedTime} -//
-//
-// {duration} mins -//
-//
- -// {/* CTA Button */} -// -//
-// -// ); -// }; - -// */} - -{ - /*
- -