cleaned up imports and comments
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
ae833a912c
commit
eec866b607
|
@ -6,6 +6,7 @@
|
|||
text-align: center;
|
||||
opacity: 1;
|
||||
|
||||
max-height: 500px; /* just for smooth fade in purposes */
|
||||
transition: max-height 1000ms ease-in, padding 100ms ease-in;
|
||||
/* The following are for a smooth fade in if there ever is a loading required for the warning, is not needed currently */
|
||||
/* max-height: 500px;
|
||||
/* transition: max-height 1000ms ease-in, padding 100ms ease-in; */
|
||||
}
|
|
@ -1,11 +1,6 @@
|
|||
import { start } from "repl";
|
||||
|
||||
import { parse } from "date-fns";
|
||||
import { utcToZonedTime, zonedTimeToUtc } from "date-fns-tz";
|
||||
import { GetStaticProps } from "next";
|
||||
import React, { useState, useEffect } from "react";
|
||||
|
||||
import { getCurrentTerm } from "@/lib/events";
|
||||
import React from "react";
|
||||
|
||||
import warnings from "../content/warnings/warnings.json";
|
||||
|
||||
|
@ -74,14 +69,9 @@ function getCurrentWarning(): Warning | null {
|
|||
export function WarningHeader() {
|
||||
const warning = getCurrentWarning();
|
||||
|
||||
if (!warning || warning.message == "") {
|
||||
return (
|
||||
<div
|
||||
className={styles.warning}
|
||||
style={{ maxHeight: 0, opacity: 0, padding: 0 }}
|
||||
></div>
|
||||
);
|
||||
}
|
||||
|
||||
return <div className={styles.warning}>{warning.message}</div>;
|
||||
return !warning || warning.message == "" ? (
|
||||
<></>
|
||||
) : (
|
||||
<div className={styles.warning}>{warning.message}</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[
|
||||
{
|
||||
"startDate": "February 15 2022 00:00",
|
||||
"endDate": "March 25 2022 18:00",
|
||||
"endDate": "February 17 2022 18:00",
|
||||
"message": "This is test warning in FEB!"
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue