import Head from "next/head"; import Link from "next/link"; import React from "react"; // import { GiDiceEightFacesEight } from "react-icons/gi"; import { Logo2 } from "../web/icons/index.js"; /* Utilities */ const classNameSelected = (isSelected) => `no-underline py-4 px-2 ml-4 text-md font-medium cursor-pointer border-b-2 border-transparent ${ isSelected ? "text-blue-700 border-blue-700" : "text-gray-400 hover:text-blue-500 hover:border-blue-500" }`; let calculateLastUpdate = () => { let today = new Date().toISOString(); let yesterdayObj = new Date(); yesterdayObj.setDate(yesterdayObj.getDate() - 1); let yesterday = yesterdayObj.toISOString(); if (today.slice(11, 16) > "02:00") { return today.slice(0, 10); } else { return yesterday.slice(0, 10); } }; // Error catcher class ErrorBoundary extends React.Component { // https://reactjs.org/docs/error-boundaries.html constructor(props) { super(props); this.state = { error: null, errorInfo: null }; } componentDidCatch(error, errorInfo) { // Catch errors in any components below and re-render with error message this.setState({ error: error, errorInfo: errorInfo, }); // You can also log error messages to an error reporting service here } render() { if (this.state.errorInfo) { // Error path return (