aboutsummaryrefslogtreecommitdiff
path: root/components/PSA.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2023-07-17 15:08:57 -0400
committerAndrew Lee <alee14498@protonmail.com>2023-07-17 15:08:57 -0400
commitddbe4fa61425f6a871a23238ce15a0929e201e6e (patch)
treec1d5c2a0674bcbf2cf79180445d8d26518b7009d /components/PSA.js
parent8fbaca0d8ec9dc1323facb7f4c0029e32cfe5223 (diff)
downloadalure-website-ddbe4fa61425f6a871a23238ce15a0929e201e6e.tar.gz
alure-website-ddbe4fa61425f6a871a23238ce15a0929e201e6e.tar.bz2
alure-website-ddbe4fa61425f6a871a23238ce15a0929e201e6e.zip
Modularizing certain elements; Working information section
Diffstat (limited to 'components/PSA.js')
-rw-r--r--components/PSA.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/components/PSA.js b/components/PSA.js
new file mode 100644
index 0000000..c259f19
--- /dev/null
+++ b/components/PSA.js
@@ -0,0 +1,38 @@
+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-4";
+ let styleImportant;
+ let important;
+ switch (psaMessage.important) {
+ case 0:
+ styleImportant = "hidden"
+ defaultStyle += ' ' + styleImportant
+ break;
+ case 1:
+ important = "WARNING!"
+ styleImportant = "bg-yellow-700"
+ defaultStyle += ' ' + styleImportant
+ break;
+ case 2:
+ important = "EMERGENCY!"
+ styleImportant = "bg-red-800"
+ defaultStyle += ' ' + styleImportant
+ break;
+
+ }
+
+ return (
+ <div className={defaultStyle}>
+ <p className="text-lg font-medium">{important}</p>
+ <p>{psaMessage.announcement} {psaMessage.link && (
+ <Link href={psaMessage.link}>
+ Learn more ↗
+ </Link>
+ )}</p>
+ </div>
+ )
+}
+
+export default PSA;