Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

Fix: hydration error, minor refactor

Khuram Niaz6d2db31ebde9
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..7003b54
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,28 @@
+{
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Next.js: debug server-side",
+ "type": "node-terminal",
+ "request": "launch",
+ "command": "npm run dev"
+ },
+ {
+ "name": "Next.js: debug client-side",
+ "type": "chrome",
+ "request": "launch",
+ "url": "http://localhost:3000/dashboard"
+ },
+ {
+ "name": "Next.js: debug full stack",
+ "type": "node-terminal",
+ "request": "launch",
+ "command": "npm run dev",
+ "serverReadyAction": {
+ "pattern": "- Local:.+(https?://.+)",
+ "uriFormat": "%s",
+ "action": "debugWithChrome"
+ }
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index e99a963..207f318 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -3,7 +3,6 @@ import { Inter as FontSans } from "next/font/google";
import "./globals.css";
import { cn } from "@/lib/utils";
import { ThemeProvider } from "@/components/theme-provider";
-import { SessionProvider } from "next-auth/react";
const fontSans = FontSans({
subsets: ["latin"],
@@ -24,24 +23,22 @@ interface Props {
export default function RootLayout({ children }: Readonly<Props>) {
return (
- <SessionProvider>
- <html lang="en">
- <body
- className={cn(
- "min-h-screen bg-background font-sans antialiased",
- fontSans.variable
- )}
+ <html lang="en">
+ <body
+ className={cn(
+ "min-h-screen bg-background font-sans antialiased",
+ fontSans.variable
+ )}
+ >
+ <ThemeProvider
+ attribute="class"
+ defaultTheme="system"
+ enableSystem
+ disableTransitionOnChange
>
- <ThemeProvider
- attribute="class"
- defaultTheme="system"
- enableSystem
- disableTransitionOnChange
- >
- {children}
- </ThemeProvider>
- </body>
- </html>
- </SessionProvider>
+ {children}
+ </ThemeProvider>
+ </body>
+ </html>
);
}
diff --git a/src/auth.ts b/src/auth.ts
index f4ad80f..3147c1a 100644
--- a/src/auth.ts
+++ b/src/auth.ts
@@ -33,7 +33,6 @@ export const { auth, handlers, signIn, signOut } = NextAuth({
const user = await getUser(email);
if (!user) return null;
const passwordsMatch = await bcrypt.compare(password, user.password);
- console.log("passwordmatch", passwordsMatch);
if (passwordsMatch) return user;
}
console.log("Invalid credentials");
diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index 2706f50..b407fc8 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -65,6 +65,7 @@ async function Header() {
<div className="relative ml-auto flex-1 md:grow-0">
<Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
<Input
+ id="search"
type="search"
placeholder="Search..."
className="w-full rounded-lg bg-background pl-8 md:w-[200px] lg:w-[336px]"
diff --git a/src/components/SigninForm.tsx b/src/components/SigninForm.tsx
index 3815a58..87571f7 100644
--- a/src/components/SigninForm.tsx
+++ b/src/components/SigninForm.tsx
@@ -76,7 +76,11 @@ function SigninForm() {
<FormItem>
<FormLabel>Email</FormLabel>
<FormControl>
- <Input placeholder="[email protected]" {...field} />
+ <Input
+ id="email"
+ placeholder="[email protected]"
+ {...field}
+ />
</FormControl>
<FormMessage />
</FormItem>
@@ -91,7 +95,7 @@ function SigninForm() {
<FormItem>
<FormLabel>Password</FormLabel>
<FormControl>
- <Input type="password" {...field} />
+ <Input id="password" type="password" {...field} />
</FormControl>
<FormMessage />
</FormItem>
diff --git a/src/components/UserAvatar.tsx b/src/components/UserAvatar.tsx
index d7a867a..6479e01 100644
--- a/src/components/UserAvatar.tsx
+++ b/src/components/UserAvatar.tsx
@@ -8,20 +8,12 @@ export default function UserAvatar({ user }: { user: SessionUser }) {
// console.log("session user :", session?.user, status);
if (!user) return null;
return (
- <>
- <Button
- variant="outline"
- size="icon"
- className="overflow-hidden rounded-full"
- >
- <Image
- src="/images/placeholder-user.jpg"
- width={36}
- height={36}
- alt="Avatar"
- className="overflow-hidden rounded-full"
- />
- </Button>
- </>
+ <Image
+ src="/images/placeholder-user.jpg"
+ width={36}
+ height={36}
+ alt="Avatar"
+ className="overflow-hidden rounded-full"
+ />
);
}