Skip to content

Commit c1d0e3c

Browse files
authored
feat: update navigation links in ProjectInfo component and adjust layout for responsiveness; remove unused settings page
1 parent 2aae7de commit c1d0e3c

3 files changed

Lines changed: 48 additions & 51 deletions

File tree

app/(Components)/Header.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function ProjectInfo() {
2626
const ProjectInfo = {
2727
title: "OpenSignal",
2828
navLinks: [
29-
{ name: "login", path: "/" },
29+
{ name: "About", path: "/" },
3030
{ name: "Dashboard", path: "/dashboard" },
3131
],
3232
};
@@ -54,24 +54,26 @@ export default function ProjectInfo() {
5454
_light={{ bg: "white" }}
5555
justifyContent={"space-between"}
5656
id={"nav"}
57-
px={"2"}
57+
px={current === "base" || current === "sm" ? "2vh" : "2.5vh"}
5858
>
5959
<HStack alignItems={"center"} h={"100%"}>
60-
<Heading size={"5xl"}>{title}</Heading>
60+
<Heading size={current === "base" || current === "sm" ? "2xl" : "5xl"}>{title}</Heading>
6161
</HStack>
6262
<HStack>
6363
{current !== "base" && current !== "sm" ? (
6464
<HStack>
6565
{navLinks.map((link, index) => (
66-
<ChakraLink key={index} href={link.href}>
66+
<ChakraLink key={index} href={link.path}>
6767
{link.name}
6868
</ChakraLink>
6969
))}
7070
<ColorModeButton
71-
size="sm"
72-
variant="subtle"
73-
title={`switch to ${colorMode === "light" ? "dark" : "light"} mode`}
74-
/>
71+
size="sm"
72+
variant="subtle"
73+
title={`switch to ${
74+
colorMode === "light" ? "dark" : "light"
75+
} mode`}
76+
/>
7577
</HStack>
7678
) : null}
7779
{current === "base" || current === "sm" ? (
@@ -137,7 +139,6 @@ export default function ProjectInfo() {
137139
</Portal>
138140
</Dialog.Root>
139141
) : null}
140-
141142
</HStack>
142143
</HStack>
143144
);
File renamed without changes.

app/page.tsx

Lines changed: 38 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use server";
22

3-
import ProjectHeader from "./(Components)/Header";
43
import ProjectFooter from "./(Components)/Footer";
54
import { Card, AbsoluteCenter, Container, Avatar } from "@chakra-ui/react";
65
import { auth } from "./auth";
@@ -11,56 +10,53 @@ export default async function Home() {
1110
const session = await auth();
1211
if (session?.user) {
1312
return (
14-
<>
15-
<Container h={"80vh"} bg={"blue.100"}>
16-
<AbsoluteCenter>
17-
<Card.Root>
18-
<Card.Header alignItems={"center"}>
19-
<Card.Title>Welcome back, {session.user.name}!</Card.Title>
20-
</Card.Header>
21-
<Card.Body>
22-
{session.user.avatar_url && (
23-
<>
24-
<Avatar.Root>
25-
<Avatar.Image
26-
src={session.user.avatar_url}
27-
alt={session.user.name || "User Avatar"}
28-
/>
29-
<Avatar.Fallback>
30-
{session.user?.name?.charAt(0)}
31-
</Avatar.Fallback>
32-
</Avatar.Root>
33-
BIO:{session.user?.email}
34-
</>
35-
)}
36-
<SignOutButton />
37-
</Card.Body>
38-
</Card.Root>
39-
</AbsoluteCenter>
40-
</Container>
41-
<ProjectFooter />
42-
</>
43-
);
44-
}
45-
return (
46-
<>
47-
<Container h={"80vh"} bg={"blue.100"}>
13+
<Container h={"80vh"} bg={"blue.100"} position={"relative"}>
4814
<AbsoluteCenter>
4915
<Card.Root>
5016
<Card.Header alignItems={"center"}>
51-
<Card.Title>You Are Not Signed In</Card.Title>
52-
<Card.Description>
53-
This application requires you to be signed in to access its
54-
features.
55-
</Card.Description>
17+
<Card.Title>Welcome back, {session.user.name}!</Card.Title>
5618
</Card.Header>
5719
<Card.Body>
58-
<SignInButton />
20+
{session.user.avatar_url && (
21+
<>
22+
<Avatar.Root>
23+
<Avatar.Image
24+
src={session.user.avatar_url}
25+
alt={session.user.name || "User Avatar"}
26+
/>
27+
<Avatar.Fallback>
28+
{session.user?.name?.charAt(0)}
29+
</Avatar.Fallback>
30+
</Avatar.Root>
31+
BIO:{session.user?.email}
32+
</>
33+
)}
34+
<SignOutButton />
5935
</Card.Body>
6036
</Card.Root>
6137
</AbsoluteCenter>
38+
<ProjectFooter />
6239
</Container>
40+
);
41+
}
42+
return (
43+
<Container h={"80vh"} bg={"blue.100"} maxW={"xl"} position={"relative"}>
44+
<AbsoluteCenter>
45+
<Card.Root size={"lg"}>
46+
<Card.Header alignItems={"center"}>
47+
<Card.Title>Your code is your credential</Card.Title>
48+
<Card.Description>
49+
Join 1,000+ developers proving that impact beats pedigree. Every
50+
commit counts. Every contributor matters. Every profile becomes
51+
proof.
52+
</Card.Description>
53+
</Card.Header>
54+
<Card.Body>
55+
<SignInButton />
56+
</Card.Body>
57+
</Card.Root>
58+
</AbsoluteCenter>
6359
<ProjectFooter />
64-
</>
60+
</Container>
6561
);
6662
}

0 commit comments

Comments
 (0)