From b56642fda8507e028eb0278d92914739ec1a6a78 Mon Sep 17 00:00:00 2001 From: shafin-r Date: Sun, 15 Feb 2026 18:37:28 +0600 Subject: [PATCH] fix(ui): fix minor ui bugs --- src/components/AppSidebar.tsx | 17 ++++++++----- src/pages/student/Home.tsx | 2 +- src/pages/student/StudentLayout.tsx | 2 +- src/pages/student/practice/Test.tsx | 38 ++++++++++++++--------------- 4 files changed, 32 insertions(+), 27 deletions(-) diff --git a/src/components/AppSidebar.tsx b/src/components/AppSidebar.tsx index 3b34fe2..2167cb6 100644 --- a/src/components/AppSidebar.tsx +++ b/src/components/AppSidebar.tsx @@ -26,9 +26,12 @@ import { import { useState } from "react"; import logo from "../assets/ed_logo1.png"; import { NavLink } from "react-router-dom"; +import { useAuthStore } from "../stores/authStore"; +import { Avatar, AvatarFallback, AvatarImage } from "./ui/avatar"; export function AppSidebar() { const [open, setOpen] = useState(true); + const user = useAuthStore((s) => s.user); return ( @@ -195,13 +198,15 @@ export function AppSidebar() { {/* FOOTER */}
- + + + + {user?.name.slice(0, 1)} + +
- shadcn - m@example.com + {user?.name} + {user?.email}
diff --git a/src/pages/student/Home.tsx b/src/pages/student/Home.tsx index 81c3f0f..9fd7a0c 100644 --- a/src/pages/student/Home.tsx +++ b/src/pages/student/Home.tsx @@ -84,7 +84,7 @@ export const Home = () => { }; return ( -
+

Welcome, {user?.name || "Student"}

diff --git a/src/pages/student/StudentLayout.tsx b/src/pages/student/StudentLayout.tsx index 11b81d4..a641dca 100644 --- a/src/pages/student/StudentLayout.tsx +++ b/src/pages/student/StudentLayout.tsx @@ -14,7 +14,7 @@ export function StudentLayout() { return ( -
+
{/* Desktop Sidebar */}
diff --git a/src/pages/student/practice/Test.tsx b/src/pages/student/practice/Test.tsx index d963987..b92bc35 100644 --- a/src/pages/student/practice/Test.tsx +++ b/src/pages/student/practice/Test.tsx @@ -237,7 +237,7 @@ export const Test = () => { if (question.options && question.options.length > 0) { const eliminatedSet = eliminated[question.id] ?? new Set(); return ( -
+
{question.options.map((option, index) => { const isSelected = currentAnswer === option.id; const isEliminated = eliminatedSet.has(option.id); @@ -245,7 +245,7 @@ export const Test = () => { return (
@@ -407,28 +407,28 @@ export const Test = () => {

{currentModule?.module_title}

- {/*

- {practiceSheet?.modules[0].description} -

*/} +

- {currentQuestion?.context && ( -
-

- {renderQuestionText(currentQuestion?.context)} +

+ {currentQuestion?.context && ( +
+

+ {renderQuestionText(currentQuestion?.context)} +

+
+ )} + +
+
+

+ {currentQuestion?.text && + renderQuestionText(currentQuestion.text)}

- )} - -
-
-

- {currentQuestion?.text && - renderQuestionText(currentQuestion.text)} -

{renderAnswerInput(currentQuestion)}