diff --git a/apps/app/src/components/DistributorBadges.tsx b/apps/app/src/components/DistributorBadges.tsx new file mode 100644 index 00000000..c0217366 --- /dev/null +++ b/apps/app/src/components/DistributorBadges.tsx @@ -0,0 +1,24 @@ +import { Badge } from "./ui/badge"; + +export function DistributorBadges({ + distribute, +}: { + distribute: { plugin: string }[]; +}) { + return ( + <> +

Posting to:

+ {distribute.map((distributor) => { + const pluginName = distributor.plugin.replace("@curatedotfun/", ""); + return ( + + {pluginName} + + ); + })} + + ); +} diff --git a/apps/app/src/routes/_layout/feed/$feedId.tsx b/apps/app/src/routes/_layout/feed/$feedId.tsx index 19f653f8..d1e44669 100644 --- a/apps/app/src/routes/_layout/feed/$feedId.tsx +++ b/apps/app/src/routes/_layout/feed/$feedId.tsx @@ -3,6 +3,7 @@ import { ListFilter } from "lucide-react"; import FeedLayout from "../../../components/FeedLayout"; import { Badge } from "../../../components/ui/badge"; import { useFeed } from "../../../lib/api"; +import { DistributorBadges } from "../../../components/DistributorBadges"; const TABS = [ // { @@ -94,23 +95,13 @@ function FeedPageLayout() { Twitter -
-

Posting to:

- {feed?.config?.outputs?.stream?.distribute?.map((distributor) => { - const pluginName = distributor.plugin.replace( - "@curatedotfun/", - "", - ); - return ( - - {pluginName} - - ); - })} -
+ {(feed?.config?.outputs?.stream?.distribute?.length ?? 0) > 0 && ( +
+ +
+ )}