generated from plutack/nextjsauth-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecent-links.tsx
37 lines (35 loc) · 1.02 KB
/
recent-links.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"use client";
import React from "react";
import { Link1Icon, ArrowRightIcon } from "@radix-ui/react-icons";
import Link from "next/link";
interface LinkData {
link: string;
customSuffix: string;
}
interface RecentLinksProps {
links: LinkData[];
}
export function RecentLinks({ links }: RecentLinksProps) {
return (
<div className="space-y-4">
{links.map((item, index) => (
<div key={index} className="flex items-center space-x-4">
<Link1Icon className="h-6 w-6" />
<div className="flex-1 min-w-0">
<Link
href={`/${item.customSuffix}`}
target="_blank"
className="text-sm font-medium truncate block hover:underline"
>
{`${process.env.NEXT_PUBLIC_BASE_URL}/${item.customSuffix}`}
</Link>
<p className="text-sm text-muted-foreground truncate">
{item.link}
</p>
</div>
<ArrowRightIcon className="h-4 w-4" />
</div>
))}
</div>
);
}