refactor(search): refactor search ui for overall style coherence

This commit is contained in:
shafin-r
2026-02-21 16:53:36 +06:00
parent 65dbe99647
commit f054c7179b
6 changed files with 570 additions and 848 deletions

View File

@ -2,7 +2,6 @@ import { useEffect, useState } from "react";
import { useAuthStore } from "../../stores/authStore";
import { CheckCircle, Flame, Gauge, Play, Search } from "lucide-react";
import { api } from "../../utils/api";
import { Badge } from "../../components/ui/badge";
import type { PracticeSheet } from "../../types/sheet";
import { formatStatus } from "../../lib/utils";
import { useNavigate } from "react-router-dom";
@ -13,7 +12,6 @@ import {
AvatarFallback,
AvatarImage,
} from "../../components/ui/avatar";
import { useExamConfigStore } from "../../stores/useExamConfigStore";
import {
Drawer,
DrawerContent,
@ -334,7 +332,6 @@ const PAGE_SIZE = 2;
export const Home = () => {
const user = useAuthStore((state) => state.user);
const navigate = useNavigate();
const userXp = useExamConfigStore.getState().userXp;
const [practiceSheets, setPracticeSheets] = useState<PracticeSheet[]>([]);
const [notStartedSheets, setNotStartedSheets] = useState<PracticeSheet[]>([]);
@ -450,9 +447,9 @@ export const Home = () => {
{user?.name?.slice(0, 1)}
</AvatarFallback>
</Avatar>
<div>
<div className="space-y-1">
<p className="home-user-name">
{greeting}, {user?.name?.split(" ")[0] || "Student"} 👋
{greeting}, {user?.name?.split(" ")[0] || "Student"}
</p>
<p className="home-user-role">
{user?.role === "STUDENT"

View File

@ -360,6 +360,8 @@ const GLOBAL_STYLES = `
/* ── Retry Banner ── */
.t-retry-banner {
background: linear-gradient(90deg, ${COLORS.accent}, #ea580c);
position: fixed;
width: 100%;
color: white;
padding: 0.75rem 1rem;
font-weight: 700;