"use client";

import { useTranslations } from "next-intl";

import { Button, Typography } from "@/components/ui";

import styles from "./page.module.scss";

export default function Error({ reset }: { reset: () => void }) {
  const t = useTranslations("Subscriptions");

  return (
    <div className={styles.container}>
      <Typography as="h1" className={styles.title}>
        {t("title")}
      </Typography>
      <Typography as="p" align="center">
        {t("error")}
      </Typography>
      <Button onClick={() => reset()}>
        <Typography color="white">{t("try_again")}</Typography>
      </Button>
    </div>
  );
}
