From a922f7e437d55e352da6d11f258703acf8b8aefb Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 27 Dec 2024 10:27:50 +0000 Subject: [PATCH] Viewer badge --- app/components/Sharing/components/Suggestions.tsx | 12 +++++++----- shared/i18n/locales/en_US/translation.json | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/components/Sharing/components/Suggestions.tsx b/app/components/Sharing/components/Suggestions.tsx index 9e500b9841..b020767b8b 100644 --- a/app/components/Sharing/components/Suggestions.tsx +++ b/app/components/Sharing/components/Suggestions.tsx @@ -13,6 +13,7 @@ import Group from "~/models/Group"; import User from "~/models/User"; import ArrowKeyNavigation from "~/components/ArrowKeyNavigation"; import { Avatar, GroupAvatar, AvatarSize, IAvatar } from "~/components/Avatar"; +import Badge from "~/components/Badge"; import Empty from "~/components/Empty"; import Placeholder from "~/components/List/Placeholder"; import Scrollable from "~/components/Scrollable"; @@ -154,11 +155,12 @@ export const Suggestions = observer( } return { title: suggestion.name, - subtitle: suggestion.email - ? suggestion.email - : suggestion.isViewer - ? t("Viewer") - : t("Editor"), + subtitle: ( + <> + {suggestion.email ? `${suggestion.email} ` : ""} + {suggestion.isViewer && {t("Viewer")}} + + ), image: (