diff --git a/app/components/PublicationCard.tsx b/app/components/PublicationCard.tsx index 912e588..66c7951 100644 --- a/app/components/PublicationCard.tsx +++ b/app/components/PublicationCard.tsx @@ -1,4 +1,5 @@ import { useState } from 'react' +import { Link } from 'react-router' import { RssIcon } from '@heroicons/react/24/outline' interface Props { @@ -8,6 +9,7 @@ interface Props { export default function PublicationCard({ pub, action }: Props) { const [copied, setCopied] = useState(false) + const isSameOrigin = new URL(pub.url).origin === window.location.origin async function handleCopyFeed() { const feedUrl = `${pub.url.replace(/\/$/, '')}/feed.xml` @@ -21,7 +23,11 @@ export default function PublicationCard({ pub, action }: Props) { return (
{pub.name}
+ {isSameOrigin ? ( + {pub.name} + ) : ( + {pub.name} + )}{new URL(pub.url).host}
{pub.description && ({pub.description}
@@ -33,7 +39,7 @@ export default function PublicationCard({ pub, action }: Props) { )}