aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/dashboard/bookmarks/FooterLinkURL.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/components/dashboard/bookmarks/FooterLinkURL.tsx')
-rw-r--r--apps/web/components/dashboard/bookmarks/FooterLinkURL.tsx18
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/web/components/dashboard/bookmarks/FooterLinkURL.tsx b/apps/web/components/dashboard/bookmarks/FooterLinkURL.tsx
new file mode 100644
index 00000000..cc91a7e7
--- /dev/null
+++ b/apps/web/components/dashboard/bookmarks/FooterLinkURL.tsx
@@ -0,0 +1,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>
+ );
+}