aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/dashboard/bookmarks/FooterLinkURL.tsx
blob: cc91a7e74b0edfe9bd62fe916d88d8aeeecee57e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import Link from "next/link";

export default function FooterLinkURL({ url }: { url: string | null }) {
  if (!url) {
    return null;
  }
  const parsedUrl = new URL(url);
  return (
    <Link
      className="line-clamp-1 hover:text-foreground"
      href={url}
      target="_blank"
      rel="noreferrer"
    >
      {parsedUrl.host}
    </Link>
  );
}