Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
link support in descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
intergalacticspacehighway committed Dec 7, 2023
1 parent 3c5ab8e commit 1231138
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/app/components/video-feed/video-feed-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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 (
<View tw="w-full items-center md:py-10">
Expand Down Expand Up @@ -100,7 +105,7 @@ export const VideoFeedItem = memo(function VideoFeedItem({
) : null}
</View>
<CollapsibleText tw="text-white" initialNumberOfLines={1}>
{post.description}
{description}
</CollapsibleText>
</View>
<View tw="flex-1 items-end" style={{ rowGap: 16 }}>
Expand Down

0 comments on commit 1231138

Please sign in to comment.