Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🐛 Switch to icon for YouAvatar

Luke Vellac4b9edf297e1
diff --git a/apps/web/src/components/poll/you-avatar.tsx b/apps/web/src/components/poll/you-avatar.tsx
index 44a4ff0a4..4581571f9 100644
--- a/apps/web/src/components/poll/you-avatar.tsx
+++ b/apps/web/src/components/poll/you-avatar.tsx
@@ -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>
);
}
diff --git a/packages/ui/src/avatar.tsx b/packages/ui/src/avatar.tsx
index 60b8085bc..bcaebfb94 100644
--- a/packages/ui/src/avatar.tsx
+++ b/packages/ui/src/avatar.tsx
@@ -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);