import { fromZonedTime } from "date-fns-tz";
import Link from "next/link";
import { Icon } from "../general/Icon";
import styles from "./studioShortcut.module.scss";

// Hidden from this date
// Note that home page revalidation happens at midnight
const showUntil = fromZonedTime("2026-08-16T00:00:00", "Europe/Oslo");

export const StudioShortcut = () => {
  if (new Date() >= showUntil) return null;

  return (
    <div className={styles.studioShortcut}>
      <Link href="/studio" className={styles.button}>
        <img
          className={styles.logo}
          src="/assets/graphics/studio-2026/studio-logo-shortcut.svg"
          alt="STUDiO"
        />
        <div className={styles.text}>
          <span className={styles.heading}>Alt om Studentfestivalen i Oslo</span><br />
          <span>Gratis arrangementer hele uka!</span>
        </div>
        <div className={styles.icon}>
          <Icon type="arrowRight" />
        </div>
      </Link>
    </div>
  );
};
