From d57226e5a802ecd6607faf67f32621e2da725a35 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 19 Jul 2023 00:48:11 -0400 Subject: Moved all components to app folder --- app/PSA.js | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 app/PSA.js (limited to 'app/PSA.js') diff --git a/app/PSA.js b/app/PSA.js new file mode 100644 index 0000000..06bf9ba --- /dev/null +++ b/app/PSA.js @@ -0,0 +1,47 @@ +import psaMessage from './psa.json' assert { type: 'json' }; +import Link from "next/link"; + +const PSA = () => { + let defaultStyle = "flex flex-row md:px-40 px-30 py-0.5 space-x-2"; + let styleImportant; + let important; + switch (psaMessage.important) { + case 0: + styleImportant = "hidden" + defaultStyle += ' ' + styleImportant + break; + case 1: + important = "Latest News:" + styleImportant = "bg-zinc-700" + defaultStyle += ' ' + styleImportant + break; + case 2: + important = "WARNING!" + styleImportant = "bg-yellow-700" + defaultStyle += ' ' + styleImportant + break; + case 3: + important = "EMERGENCY!" + styleImportant = "bg-red-800" + defaultStyle += ' ' + styleImportant + break; + + } + + return ( +
+

{important}

+
+

{psaMessage.announcement}

+

+ {psaMessage.link && ( + + Learn more ↗ + + )}

+
+
+ ) +} + +export default PSA; -- cgit v1.2.3