1import { useEffect, useState } from "preact/hooks";23import { dateToSlug } from "@/lib/date/daily.ts";4import { buildDailyPath } from "@/lib/site/paths.ts";56interface DailyStackLinkProps {7 fallbackDate: string;8}910export default function DailyStackLink({ fallbackDate }: DailyStackLinkProps) {11 const [href, setHref] = useState(buildDailyPath(fallbackDate));1213 useEffect(() => {14 setHref(buildDailyPath(dateToSlug(new Date())));15 }, [fallbackDate]);1617 return (18 <a class="btn" href={href}>19 <span class="btn__blink" aria-hidden="true">▶</span>20 PLAY TODAY21 </a>22 );23}