Refactor profileBar component to fix notification count display

This commit is contained in:
Pattadon 2024-10-31 15:19:06 +07:00
parent 7d60a209fa
commit 22fe709ce8

View File

@ -33,14 +33,14 @@ const UnAuthenticatedComponents = () => {
};
const AuthenticatedComponents = ({ uid }: { uid: string }) => {
let notifications = 100;
let notifications = 1;
const displayValue = notifications >= 100 ? "..." : notifications;
return (
<div className="flex gap-3 pl-2 items-center">
<Link href={"/notification"}>
<div className="relative inline-block">
<Bell className="h-6 w-6" />
<span className="absolute -top-1 -right-1 inline-flex items-center justify-center w-4 h-4 text-xs font-bold text-white bg-red-600 rounded-full">
<Bell className="h-6 w-6 " />
<span className="absolute -top-1 -right-1 inline-flex items-center justify-center w-4 h-4 text-xs font-bold text-white bg-red-600 rounded-full animate-ping">
{displayValue}
</span>
</div>