File tree Expand file tree Collapse file tree
(User Dashboard)/dashboard Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"use client" ;
22
3- import { HStack , Heading , Container } from "@chakra-ui/react" ;
3+ import {
4+ HStack ,
5+ Heading ,
6+ Container ,
7+ useBreakpointValue ,
8+ } from "@chakra-ui/react" ;
49import { ColorModeButton , useColorMode } from "@/components/ui/color-mode" ;
510
6- export default function ProjectHeader ( {
7- projectTitle,
8- } : {
9- projectTitle : string ;
10- } ) {
11+ export default function ProjectInfo ( ) {
12+ const ProjectInfo = {
13+ title : "OpenSignal" ,
14+ navLinks : [
15+ { name : "login" , href : "/" } ,
16+ { name : "Dashboard" , href : "/dashboard" } ,
17+ ] ,
18+ } ;
19+ const current = useBreakpointValue ( {
20+ base : "base" ,
21+ sm : "sm" ,
22+ md : "md" ,
23+ lg : "lg" ,
24+ xl : "xl" ,
25+ "2xl" : "2xl" ,
26+ } ) ;
27+ const Title = "OpenSignal" ;
1128 const { colorMode } = useColorMode ( ) ;
1229
1330 return (
14- < Container h = { "10vh" } position = { "fixed" } >
31+ < Container
32+ h = { "10vh" }
33+ position = { "fixed" }
34+ zIndex = { 1 }
35+ _dark = { { bg : "black" } }
36+ _light = { { bg : "white" } }
37+ >
1538 < HStack alignItems = { "center" } justifyContent = { "space-between" } h = { "100%" } >
16- < Heading size = { "5xl" } > { projectTitle } </ Heading >
39+ < Heading size = { "5xl" } > { Title } </ Heading >
40+
1741 < ColorModeButton
1842 size = "sm"
1943 variant = "subtle"
Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ export default async function Home() {
4040
4141 return (
4242 < Stack >
43- < ProjectHeader projectTitle = "OpenSignal" />
4443 < Container maxW = "container.md" py = { 8 } >
4544 < Card . Root position = "relative" p = { 8 } mt = { 8 } >
4645 { session ? (
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ import { Geist, Geist_Mono } from "next/font/google";
33import "./globals.css" ;
44import { Provider } from "@/components/ui/provider" ;
55import { SessionProvider } from "next-auth/react" ;
6+
7+ import ProjectInfo from "@/app/(Components)/Header" ;
8+
69const geistSans = Geist ( {
710 variable : "--font-geist-sans" ,
811 subsets : [ "latin" ] ,
@@ -29,7 +32,10 @@ export default function RootLayout({
2932 className = { `${ geistSans . variable } ${ geistMono . variable } antialiased` }
3033 >
3134 < SessionProvider >
32- < Provider > { children } </ Provider >
35+ < Provider >
36+ < ProjectInfo />
37+ { children }
38+ </ Provider >
3339 </ SessionProvider >
3440 </ body >
3541 </ html >
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ export default async function Home() {
1212 if ( session ?. user ) {
1313 return (
1414 < >
15- < ProjectHeader projectTitle = { "OpenSignal" } />
1615 < Container h = { "80vh" } bg = { "blue.100" } >
1716 < AbsoluteCenter >
1817 < Card . Root >
@@ -45,7 +44,6 @@ export default async function Home() {
4544 }
4645 return (
4746 < >
48- < ProjectHeader projectTitle = { "OpenSignal" } />
4947 < Container h = { "80vh" } bg = { "blue.100" } >
5048 < AbsoluteCenter >
5149 < Card . Root >
You can’t perform that action at this time.
0 commit comments