import psaMessage from './psa.json' with { type: 'json' }; import Link from "next/link"; const PSA = () => { let defaultStyle = "flex flex-row md:px-40 sm:px-30 sm:py-0.5 p-3 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;