mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-29 10:16:32 +02:00
🐛 Switch to icon for YouAvatar
This commit is contained in:
parent
a6bb357acc
commit
c4b9edf297
2 changed files with 6 additions and 8 deletions
|
@ -1,11 +1,12 @@
|
|||
import { useTranslation } from "@/app/i18n/client";
|
||||
import { Icon } from "@rallly/ui/icon";
|
||||
import { UserIcon } from "lucide-react";
|
||||
|
||||
export function YouAvatar() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<div className="inline-flex size-5 items-center justify-center rounded-full bg-gray-200 text-xs font-medium">
|
||||
{t("you")[0]}
|
||||
<Icon>
|
||||
<UserIcon />
|
||||
</Icon>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -49,13 +49,10 @@ const colorPairs = [
|
|||
{ bg: "#EBE6FF", text: "#4800BD" }, // Light indigo
|
||||
];
|
||||
|
||||
export function getColor(seed?: string): {
|
||||
export function getColor(seed: string): {
|
||||
bgColor: string;
|
||||
textColor: string;
|
||||
} {
|
||||
if (!seed) {
|
||||
return { bgColor: "#E6F4FF", textColor: "#0065BD" };
|
||||
}
|
||||
let hash = 0;
|
||||
for (let i = 0; i < seed.length; i++) {
|
||||
hash = seed.charCodeAt(i) + ((hash << 5) - hash);
|
||||
|
|
Loading…
Add table
Reference in a new issue