diff --git a/shared/editor/components/Mentions.tsx b/shared/editor/components/Mentions.tsx index 9bdec5fcdd..6a6cd66d7e 100644 --- a/shared/editor/components/Mentions.tsx +++ b/shared/editor/components/Mentions.tsx @@ -1,5 +1,10 @@ import { observer } from "mobx-react"; -import { DocumentIcon, EmailIcon, CollectionIcon } from "outline-icons"; +import { + DocumentIcon, + EmailIcon, + CollectionIcon, + WarningIcon, +} from "outline-icons"; import { Node } from "prosemirror-model"; import * as React from "react"; import { useTranslation } from "react-i18next"; @@ -7,6 +12,7 @@ import { Link } from "react-router-dom"; import Icon from "../../components/Icon"; import Spinner from "../../components/Spinner"; import useStores from "../../hooks/useStores"; +import theme from "../../styles/theme"; import type { UnfurlResourceType, UnfurlResponse } from "../../types"; import { cn } from "../styles/utils"; import { ComponentProps } from "../types"; @@ -131,7 +137,7 @@ export const MentionIssue = (props: ComponentProps) => { } if (!data) { - return Error loading issue; + return ; } return ( @@ -172,7 +178,7 @@ export const MentionPullRequest = (props: ComponentProps) => { } if (!data) { - return Error loading pull request; + return ; } return ( @@ -192,6 +198,7 @@ export const MentionPullRequest = (props: ComponentProps) => { const MentionLoading = ({ className }: { className: string }) => { const { t } = useTranslation(); + return ( @@ -199,3 +206,14 @@ const MentionLoading = ({ className }: { className: string }) => { ); }; + +const MentionError = ({ className }: { className: string }) => { + const { t } = useTranslation(); + + return ( + + + {`${t("Error loading data")}`} + + ); +};