From 12311387ffcc42ad93541d8b6a632ebfb3bb43ac Mon Sep 17 00:00:00 2001 From: Nishan Date: Wed, 6 Dec 2023 19:56:00 -0600 Subject: [PATCH] link support in descriptions --- packages/app/components/video-feed/video-feed-item.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/app/components/video-feed/video-feed-item.tsx b/packages/app/components/video-feed/video-feed-item.tsx index 72a1db1f6..771659411 100644 --- a/packages/app/components/video-feed/video-feed-item.tsx +++ b/packages/app/components/video-feed/video-feed-item.tsx @@ -23,6 +23,7 @@ import { } from "app/hocs/with-viewability-infinite-scroll-list"; import { useCreatorTokenPriceToBuyNext } from "app/hooks/creator-token/use-creator-token-price-to-buy-next"; import { useShare } from "app/hooks/use-share"; +import { linkifyDescription } from "app/lib/linkify"; import { useLogInPromise } from "app/lib/login-promise"; import { Link } from "app/navigation/link"; import { useMuted } from "app/providers/mute-provider"; @@ -49,6 +50,10 @@ export const VideoFeedItem = memo(function VideoFeedItem({ const router = useRouter(); const { share } = useShare(); const { loginPromise } = useLogInPromise(); + const description = useMemo( + () => linkifyDescription(post.description, "text-white"), + [post.description] + ); return ( @@ -100,7 +105,7 @@ export const VideoFeedItem = memo(function VideoFeedItem({ ) : null} - {post.description} + {description}