aboutsummaryrefslogtreecommitdiff
path: root/components/PSA.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2023-07-17 20:42:50 -0400
committerAndrew Lee <alee14498@protonmail.com>2023-07-17 20:42:50 -0400
commitc4c55a93bc6af8b15f45225169758e08ff1b13cd (patch)
treebf7e7c4070e462e99bcea327588c323025b6a0bb /components/PSA.js
downloadsei-website-c4c55a93bc6af8b15f45225169758e08ff1b13cd.tar.gz
sei-website-c4c55a93bc6af8b15f45225169758e08ff1b13cd.tar.bz2
sei-website-c4c55a93bc6af8b15f45225169758e08ff1b13cd.zip
Initial rewrite
Diffstat (limited to 'components/PSA.js')
-rw-r--r--components/PSA.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/components/PSA.js b/components/PSA.js
new file mode 100644
index 0000000..8dad8b3
--- /dev/null
+++ b/components/PSA.js
@@ -0,0 +1,42 @@
+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 = "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>
+ <div className="flex flex-row space-x-3">
+ <p>{psaMessage.announcement}</p>
+ <p className="text-blue-200 hover:text-blue-500 active:text-blue-700">
+ {psaMessage.link && (
+ <Link href={psaMessage.link}>
+ Learn more ↗
+ </Link>
+ )}</p>
+ </div>
+ </div>
+ )
+}
+
+export default PSA;