@@ -4,7 +4,7 @@ import Image from "next/image";
4
4
import { Button } from "@/components/ui/button" ;
5
5
import InterviewCard from "@/components/InterviewCard" ;
6
6
7
- import { getCurrentUser } from "@/lib/actions/auth.action" ;
7
+ import { getCurrentUser , signOut } from "@/lib/actions/auth.action" ;
8
8
import {
9
9
getInterviewsByUserId ,
10
10
getLatestInterviews ,
@@ -22,72 +22,102 @@ async function Home() {
22
22
const hasUpcomingInterviews = allInterview ?. length ! > 0 ;
23
23
24
24
return (
25
- < >
26
- < section className = "card-cta" >
27
- < div className = "flex flex-col gap-6 max-w-lg" >
28
- < h2 > Get Interview-Ready with AI-Powered Practice & Feedback </ h2 >
29
- < p className = "text-lg" >
30
- Practice real interview questions & get instant feedback
31
- </ p >
32
-
33
- < Button asChild className = "btn-primary max-sm:w-full" >
34
- < Link href = "/interview" > Start an Interview</ Link >
35
- </ Button >
25
+ < div className = "min-h-screen bg-gradient-to-b from-background to-muted" >
26
+ { /* Updated Navbar with oval corners and better transparency */ }
27
+ < nav className = "fixed top-4 left-4 right-4 z-50" >
28
+ < div className = "max-w-7xl mx-auto" >
29
+ < div className = "backdrop-blur-sm bg-background/40 border border-border/40 rounded-full px-6" >
30
+ < div className = "flex items-center justify-between h-14" >
31
+ < div className = "flex items-center gap-6" >
32
+ < span className = "text-sm text-muted-foreground" >
33
+ Welcome back,{ " " }
34
+ < span className = "font-medium text-foreground" >
35
+ { user ?. name }
36
+ </ span >
37
+ </ span >
38
+ < form action = { signOut } >
39
+ < Button
40
+ variant = "ghost"
41
+ type = "submit"
42
+ className = "hover:bg-destructive/10 hover:text-destructive rounded-full"
43
+ >
44
+ Sign Out
45
+ </ Button >
46
+ </ form >
47
+ </ div >
48
+ </ div >
49
+ </ div >
36
50
</ div >
51
+ </ nav >
37
52
38
- < Image
39
- src = "/robot.png"
40
- alt = "robo-dude"
41
- width = { 400 }
42
- height = { 400 }
43
- className = "max-sm:hidden"
44
- />
45
- </ section >
53
+ { /* Adjust main content padding */ }
54
+ < main className = "pt-24 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto" >
55
+ < section className = "card-cta" >
56
+ < div className = "flex flex-col gap-6 max-w-lg" >
57
+ < h2 > Get Interview-Ready with AI-Powered Practice & Feedback </ h2 >
58
+ < p className = "text-lg" >
59
+ Practice real interview questions & get instant feedback
60
+ </ p >
46
61
47
- < section className = "flex flex-col gap-6 mt-8" >
48
- < h2 > Your Interviews</ h2 >
62
+ < Button asChild className = "btn-primary max-sm:w-full" >
63
+ < Link href = "/interview" > Start an Interview</ Link >
64
+ </ Button >
65
+ </ div >
49
66
50
- < div className = "interviews-section" >
51
- { hasPastInterviews ? (
52
- userInterviews ?. map ( ( interview ) => (
53
- < InterviewCard
54
- key = { interview . id }
55
- userId = { user ?. id }
56
- interviewId = { interview . id }
57
- role = { interview . role }
58
- type = { interview . type }
59
- techstack = { interview . techstack }
60
- createdAt = { interview . createdAt }
61
- />
62
- ) )
63
- ) : (
64
- < p > You haven't taken any interviews yet</ p >
65
- ) }
66
- </ div >
67
- </ section >
67
+ < Image
68
+ src = "/robot.png"
69
+ alt = "robo-dude"
70
+ width = { 400 }
71
+ height = { 400 }
72
+ className = "max-sm:hidden"
73
+ />
74
+ </ section >
68
75
69
- < section className = "flex flex-col gap-6 mt-8" >
70
- < h2 > Take Interviews</ h2 >
76
+ < section className = "flex flex-col gap-6 mt-8" >
77
+ < h2 > Your Interviews</ h2 >
71
78
72
- < div className = "interviews-section" >
73
- { hasUpcomingInterviews ? (
74
- allInterview ?. map ( ( interview ) => (
75
- < InterviewCard
76
- key = { interview . id }
77
- userId = { user ?. id }
78
- interviewId = { interview . id }
79
- role = { interview . role }
80
- type = { interview . type }
81
- techstack = { interview . techstack }
82
- createdAt = { interview . createdAt }
83
- />
84
- ) )
85
- ) : (
86
- < p > There are no interviews available</ p >
87
- ) }
88
- </ div >
89
- </ section >
90
- </ >
79
+ < div className = "interviews-section" >
80
+ { hasPastInterviews ? (
81
+ userInterviews ?. map ( ( interview ) => (
82
+ < InterviewCard
83
+ key = { interview . id }
84
+ userId = { user ?. id }
85
+ interviewId = { interview . id }
86
+ role = { interview . role }
87
+ type = { interview . type }
88
+ techstack = { interview . techstack }
89
+ createdAt = { interview . createdAt }
90
+ />
91
+ ) )
92
+ ) : (
93
+ < p > You haven't taken any interviews yet</ p >
94
+ ) }
95
+ </ div >
96
+ </ section >
97
+
98
+ < section className = "flex flex-col gap-6 mt-8" >
99
+ < h2 > Take Interviews</ h2 >
100
+
101
+ < div className = "interviews-section" >
102
+ { hasUpcomingInterviews ? (
103
+ allInterview ?. map ( ( interview ) => (
104
+ < InterviewCard
105
+ key = { interview . id }
106
+ userId = { user ?. id }
107
+ interviewId = { interview . id }
108
+ role = { interview . role }
109
+ type = { interview . type }
110
+ techstack = { interview . techstack }
111
+ createdAt = { interview . createdAt }
112
+ />
113
+ ) )
114
+ ) : (
115
+ < p > There are no interviews available</ p >
116
+ ) }
117
+ </ div >
118
+ </ section >
119
+ </ main >
120
+ </ div >
91
121
) ;
92
122
}
93
123
0 commit comments