Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Revert "add prototypes schedule page (#2)"
Browse files Browse the repository at this point in the history
This reverts commit 638ada6.
  • Loading branch information
saeidex committed Dec 6, 2024
1 parent 579507c commit 0f419d8
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 141 deletions.
27 changes: 0 additions & 27 deletions apps/next/src/app/_components/bus-schedule.tsx

This file was deleted.

44 changes: 0 additions & 44 deletions apps/next/src/app/_components/class-schedule.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions apps/next/src/app/_components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <DashboardNavbar className={className} />;
export const DashboardHeader = () => {
return <DashboardNavbar />;
};

export const LandingHeader = () => {
Expand Down
33 changes: 5 additions & 28 deletions apps/next/src/app/_components/navbar.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div
className={cn(
"container flex h-20 w-full justify-between bg-red-300",
className,
)}
>
<Button variant="outline">{currentTime}</Button>
<div className="container flex h-20 w-full justify-between">
UBus
<UserAvatar />
<LogoutButton />
</div>
);
};
Expand Down
18 changes: 0 additions & 18 deletions apps/next/src/app/_components/sidebar.tsx

This file was deleted.

3 changes: 2 additions & 1 deletion apps/next/src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { DashboardHeader } from "../_components/header";

const Dashboard = () => {
return <div>HEllo world</div>;
return <DashboardHeader />;
};

export default Dashboard;
21 changes: 0 additions & 21 deletions apps/next/src/app/dashboard/schedule/page.tsx

This file was deleted.

0 comments on commit 0f419d8

Please sign in to comment.