fix: resolve Next.js rendering errors, hook unhandled fetch error, theme logo layout, double header, and FastAPI multipart dependency
This commit is contained in:
@@ -11,3 +11,4 @@ celery==5.3.6
|
||||
openai==1.14.0
|
||||
httpx==0.27.2
|
||||
boto3==1.34.0
|
||||
python-multipart==0.0.9
|
||||
|
||||
@@ -41,20 +41,24 @@ export default function DashboardLayout({ children }: { children: ReactNode }) {
|
||||
<aside className="w-64 border-r border-border bg-background flex flex-col hidden md:flex">
|
||||
<div className="p-6">
|
||||
<Link href="/dashboard" className="block relative h-16 w-full hover:opacity-90 transition-opacity">
|
||||
<Image
|
||||
src="/PragatiVeer_Logo/SVG_Logos/Rectangular_light_background.svg"
|
||||
alt="PragatiVeer"
|
||||
fill
|
||||
className="object-contain object-left scale-135 origin-left dark:hidden"
|
||||
priority
|
||||
/>
|
||||
<Image
|
||||
src="/PragatiVeer_Logo/SVG_Logos/Rectangular_dark_background.svg"
|
||||
alt="PragatiVeer"
|
||||
fill
|
||||
className="object-contain object-left scale-135 origin-left hidden dark:block"
|
||||
priority
|
||||
/>
|
||||
<div className="absolute inset-0 dark:hidden">
|
||||
<Image
|
||||
src="/PragatiVeer_Logo/SVG_Logos/Rectangular_light_background.svg"
|
||||
alt="PragatiVeer"
|
||||
fill
|
||||
className="object-contain object-left"
|
||||
priority
|
||||
/>
|
||||
</div>
|
||||
<div className="absolute inset-0 hidden dark:block">
|
||||
<Image
|
||||
src="/PragatiVeer_Logo/SVG_Logos/Rectangular_dark_background.svg"
|
||||
alt="PragatiVeer"
|
||||
fill
|
||||
className="object-contain object-left"
|
||||
priority
|
||||
/>
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
<nav className="flex-1 px-4 space-y-1.5 mt-4 overflow-y-auto">
|
||||
|
||||
@@ -28,11 +28,7 @@ export default function DashboardPage() {
|
||||
|
||||
return (
|
||||
<div className="p-8 max-w-6xl mx-auto space-y-10 animate-in fade-in duration-500 slide-in-from-bottom-4">
|
||||
<header className="flex flex-col md:flex-row md:items-center justify-between gap-4">
|
||||
<div>
|
||||
<h1 className="text-3xl font-bold tracking-tight">Welcome back, Demo Student</h1>
|
||||
<p className="text-muted-foreground mt-1 font-medium">Let's keep up the momentum for JEE Advanced 2027.</p>
|
||||
</div>
|
||||
<header className="flex justify-end mb-2">
|
||||
<Button size="lg" className="gap-2 shadow-sm bg-[#00F0FF] text-background hover:bg-[#00F0FF]/90 font-bold">
|
||||
<BrainCircuit size={18} />
|
||||
Generate AI Plan
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
@@ -44,7 +44,10 @@ export function useActiveUser() {
|
||||
try {
|
||||
const res = await fetch(`/api/users/${id}`);
|
||||
if (!res.ok) {
|
||||
throw new Error("Failed to fetch user profile");
|
||||
console.error("Failed to fetch user profile, status:", res.status);
|
||||
setError("Failed to fetch user profile");
|
||||
setUser(null);
|
||||
return;
|
||||
}
|
||||
const data = await res.json();
|
||||
setUser(data);
|
||||
|
||||
Reference in New Issue
Block a user