2024-07-15 16:07:04 +00:00
|
|
|
import { IStream } from "@futureporn/types";
|
2024-01-20 16:16:14 +00:00
|
|
|
import Link from "next/link"
|
|
|
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
|
|
import { faCalendar } from "@fortawesome/free-solid-svg-icons";
|
|
|
|
|
|
|
|
export function StreamButton({ stream }: { stream: IStream }) {
|
|
|
|
if (!stream) return <></>
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Link
|
2024-05-27 22:20:58 +00:00
|
|
|
href={`/archive/${stream.attributes.cuid}`}
|
2024-01-20 16:16:14 +00:00
|
|
|
className="button is-medium"
|
|
|
|
>
|
|
|
|
<span className="mr-2"><FontAwesomeIcon icon={faCalendar} className="fas fa-calendar" /></span><span>{new Date(stream.attributes.date).toLocaleDateString()}</span>
|
|
|
|
</Link>
|
|
|
|
)
|
|
|
|
}
|