From 2d0a742e596b195f8beeb84b3514532be6c24028 Mon Sep 17 00:00:00 2001 From: saeidex Date: Fri, 6 Dec 2024 23:19:46 +0600 Subject: [PATCH] Revert "add prototypes schedule page (#2)" This reverts commit 638ada65d3319944f4cbc7b7582cf0ef97c27dc5. --- .../next/src/app/_components/bus-schedule.tsx | 27 ------------ .../src/app/_components/class-schedule.tsx | 44 ------------------- apps/next/src/app/_components/header.tsx | 4 +- apps/next/src/app/_components/navbar.tsx | 33 +++----------- apps/next/src/app/_components/sidebar.tsx | 18 -------- apps/next/src/app/dashboard/page.tsx | 3 +- apps/next/src/app/dashboard/schedule/page.tsx | 21 --------- 7 files changed, 9 insertions(+), 141 deletions(-) delete mode 100644 apps/next/src/app/_components/bus-schedule.tsx delete mode 100644 apps/next/src/app/_components/class-schedule.tsx delete mode 100644 apps/next/src/app/_components/sidebar.tsx delete mode 100644 apps/next/src/app/dashboard/schedule/page.tsx diff --git a/apps/next/src/app/_components/bus-schedule.tsx b/apps/next/src/app/_components/bus-schedule.tsx deleted file mode 100644 index b369777..0000000 --- a/apps/next/src/app/_components/bus-schedule.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; - -export const BusSchedule: React.FC = () => { - const stations = Array(10).fill({ - station: "Malibagh Railgate", - time: "06:40 AM", - bus: "BUS 3, 29", - }); - - return ( -
-

Bus Schedule

-
- {stations.map((item, index) => ( -
-
Station: {item.station}
-
Time: {item.time}
-
Bus: {item.bus}
-
- ))} -
-
- ); -}; diff --git a/apps/next/src/app/_components/class-schedule.tsx b/apps/next/src/app/_components/class-schedule.tsx deleted file mode 100644 index 61f2a19..0000000 --- a/apps/next/src/app/_components/class-schedule.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import React from 'react'; - -export const ClassSchedule: React.FC = () => { - const classes = [ - { time: "08:30 AM", course: "CSC 283 - C++", status: "Missed" }, - { time: "09:55 AM", course: "CSC 433 - DBMS", status: "On Time" }, - { time: "11:20 AM", course: "MAT 247 - Numerical", status: "Ongoing" }, - ]; - - return ( -
-

Class Schedule

-
- {classes.map((item, index) => ( -
-
{item.time}
-
{item.course}
-
{item.status}
-
- ))} -
-
- - - -
-
- ); -}; diff --git a/apps/next/src/app/_components/header.tsx b/apps/next/src/app/_components/header.tsx index 333ee16..dc8da88 100644 --- a/apps/next/src/app/_components/header.tsx +++ b/apps/next/src/app/_components/header.tsx @@ -8,8 +8,8 @@ import { Button } from "@ubus/ui/button"; import { Logo } from "./logo"; import { DashboardNavbar, LandingNavbar } from "./navbar"; -export const DashboardHeader = ({ className }: { className?: string }) => { - return ; +export const DashboardHeader = () => { + return ; }; export const LandingHeader = () => { diff --git a/apps/next/src/app/_components/navbar.tsx b/apps/next/src/app/_components/navbar.tsx index 21a2176..1398829 100644 --- a/apps/next/src/app/_components/navbar.tsx +++ b/apps/next/src/app/_components/navbar.tsx @@ -1,38 +1,15 @@ -"use client"; - -import { useEffect, useState } from "react"; - import { landingNavLinks } from "@ubus/configs"; -import { cn } from "@ubus/ui"; -import { Button } from "@ubus/ui/button"; +import { LogoutButton } from "./logout-button"; import { NavLink } from "./navlink"; import { UserAvatar } from "./user-avatar"; -export const DashboardNavbar = ({ className }: { className?: string }) => { - const [mounted, setMounted] = useState(false); - const [currentTime, setCurrentTime] = useState(new Date().toISOString()); - - useEffect(() => { - setMounted(true); - const intervalId = setInterval(() => { - setCurrentTime(new Date().toISOString()); - }, 1000); - - return clearInterval(intervalId); - }, [currentTime]); - - if (!mounted) return null; - +export const DashboardNavbar = () => { return ( -
- +
+ UBus +
); }; diff --git a/apps/next/src/app/_components/sidebar.tsx b/apps/next/src/app/_components/sidebar.tsx deleted file mode 100644 index dc805fe..0000000 --- a/apps/next/src/app/_components/sidebar.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { cn } from "@ubus/ui"; - -export const Sidebar = ({ className }: { className?: string }) => { - return ( - - ); -}; diff --git a/apps/next/src/app/dashboard/page.tsx b/apps/next/src/app/dashboard/page.tsx index 151d08e..69531e2 100644 --- a/apps/next/src/app/dashboard/page.tsx +++ b/apps/next/src/app/dashboard/page.tsx @@ -1,6 +1,7 @@ +import { DashboardHeader } from "../_components/header"; const Dashboard = () => { - return
HEllo world
; + return ; }; export default Dashboard; diff --git a/apps/next/src/app/dashboard/schedule/page.tsx b/apps/next/src/app/dashboard/schedule/page.tsx deleted file mode 100644 index a26bda6..0000000 --- a/apps/next/src/app/dashboard/schedule/page.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { BusSchedule } from "~/app/_components/bus-schedule"; -import { ClassSchedule } from "~/app/_components/class-schedule"; -import { DashboardHeader } from "~/app/_components/header"; -import { Sidebar } from "~/app/_components/sidebar"; - -export default function SchedulePage() { - return ( -
-
- - -
- -
-
- -
-
-
- ); -}