fix: <Link /> warning

This commit is contained in:
Apoorv Mishra committed 2023-07-18 09:17:08 +05:30
1 parent 29cb3d0fe8
commit 3db37a3bf9
2 files changed
+3 -3

No files matched your search

+2 -3
View File
@@ -215,9 +215,7 @@ function HoverPreviewInternal({ element, onClose }: Props) {
<Card>
<Margin />
<CardContent>
<Content
to={data.type !== "mention" ? data.meta.url : undefined}
>
<Content to={data.meta.url}>
<Heading>{data.title}</Heading>
<Info data={data} />
</Content>
@@ -346,6 +344,7 @@ const Pointer = styled.div<{ offset: number }>`
const Content = styled(Link)`
cursor: var(--pointer);
${(props) => (!props.to ? "pointer-events: none" : "")}
`;
const Heading = styled.h2`
+1
View File
@@ -52,6 +52,7 @@ router.post(
id: mentionedUser.id,
lastActiveAt: mentionedUser.lastActiveAt,
lastViewedAt: lastView ? lastView.updatedAt : undefined,
url: "",
},
};