"use client";

export default function Error({
  error,
}: {
  error: Error & { digest?: string };
  reset: () => void;
}) {
  return (
    <div className="w-1/3 mx-auto mt-96">
      <div className="card error">
        <h1 className="text-4xl mb-8">Uh oh!</h1>
        <p>
          Seems like you found an article that doesn&apos;t exist. If you
          clicked on a link from another help article, it&apos;s likely that
          either the article has been renamed or hasn&apos;t been written yet.
        </p>
        <p>
          You can let Emma know about the missing article in
          [#help-articles](insert discord link here) on the official
          CyborgGrizzly Discord server. Be sure to include the below error and
          the page that you came from in case the link is broken.
        </p>
        <pre className="whitespace-pre-wrap rounded-md bg-black/20 p-4">
          {`${error.name}\n${error.message}\n${error.digest}`}
        </pre>
      </div>
    </div>
  );
}
