fix(ui): fix exam and result screen ui

This commit is contained in:
shafin-r
2025-07-07 17:52:01 +06:00
parent 48519c42c3
commit 22eb8285ec
8 changed files with 554 additions and 364 deletions

View File

@ -1,6 +1,38 @@
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
return twMerge(clsx(inputs));
}
export const getFromStorage = <T>(key: string): T | null => {
if (typeof window === "undefined") return null;
try {
const item = sessionStorage.getItem(key);
return item ? JSON.parse(item) : null;
} catch (error) {
console.error(`Error reading from sessionStorage (${key}):`, error);
return null;
}
};
export const setToStorage = <T>(key: string, value: T): void => {
if (typeof window === "undefined") return;
try {
sessionStorage.setItem(key, JSON.stringify(value));
} catch (error) {
console.error(`Error writing to sessionStorage (${key}):`, error);
}
};
export const removeFromStorage = (key: string): void => {
if (typeof window === "undefined") return;
try {
sessionStorage.removeItem(key);
} catch (error) {
console.error(`Error removing from sessionStorage (${key}):`, error);
}
};