diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2023-07-18 12:12:35 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2023-07-18 12:15:23 -0400 |
| commit | 3c80755e70aa85daa59edc5dbe200400894254c7 (patch) | |
| tree | 2f27b203b06dfbc68ab046bbf356a521e62ed0c8 | |
| parent | f6cc64b3b36836ced50c2f7d089b52e9e329b666 (diff) | |
| download | alure-website-3c80755e70aa85daa59edc5dbe200400894254c7.tar.gz alure-website-3c80755e70aa85daa59edc5dbe200400894254c7.tar.bz2 alure-website-3c80755e70aa85daa59edc5dbe200400894254c7.zip | |
Added latest news; Some font changes; Some tweaks
| -rw-r--r-- | app/travel-advisory/page.js | 4 | ||||
| -rw-r--r-- | components/PSA.js | 7 | ||||
| -rw-r--r-- | components/travel-advisory/ListCountries.js | 4 | ||||
| -rw-r--r-- | components/updates/PostPreview.js | 2 | ||||
| -rw-r--r-- | package.json | 2 |
5 files changed, 12 insertions, 7 deletions
diff --git a/app/travel-advisory/page.js b/app/travel-advisory/page.js index b4d845f..415b6c2 100644 --- a/app/travel-advisory/page.js +++ b/app/travel-advisory/page.js @@ -1,4 +1,4 @@ -import ListCountries from "@/components/travel-advisory/ListCountries"; +import { Countries, getDangerLevel } from "@/components/travel-advisory/ListCountries"; import Header from "@/components/Header"; export const metadata = { @@ -33,7 +33,7 @@ export default async function TravelAdvisory(){ </ul> </div> <div className="sm:px-40 px-10 py-3 bg-blue-800"><h2 className="font-medium text-lg"><b className="font-bold">WARNING!</b> This page may be inaccurate at times, refer to the <a href="https://discord.com/channels/277922530973581312/1019705091336446052" className="transition ease-in-out transition-200 text-blue-300 hover:text-blue-200 active:text-blue-500">Minecraft General Announcements</a> channel for the latest updates</h2></div> - <ListCountries /> + <Countries /> </main> ) } diff --git a/components/PSA.js b/components/PSA.js index 8dad8b3..06bf9ba 100644 --- a/components/PSA.js +++ b/components/PSA.js @@ -11,11 +11,16 @@ const PSA = () => { 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 2: + case 3: important = "EMERGENCY!" styleImportant = "bg-red-800" defaultStyle += ' ' + styleImportant diff --git a/components/travel-advisory/ListCountries.js b/components/travel-advisory/ListCountries.js index 03665ef..078af5c 100644 --- a/components/travel-advisory/ListCountries.js +++ b/components/travel-advisory/ListCountries.js @@ -3,7 +3,7 @@ import countriesData from '@/app/travel-advisory/countries.json' assert { type: import HistoryModal from "@/components/travel-advisory/HistoryModal"; import { useState } from "react"; -function getDangerLevel(danger) { +export function getDangerLevel(danger) { let dangerLevel; switch (danger) { case 0: @@ -26,7 +26,7 @@ function getDangerLevel(danger) { return dangerLevel; } -export default function Countries(){ +export function Countries(){ // eslint-disable-next-line react-hooks/rules-of-hooks const [showModal, setShowModal] = useState(false); const [selectedCountry, setSelectedCountry] = useState(null); diff --git a/components/updates/PostPreview.js b/components/updates/PostPreview.js index ca261c0..ec9183d 100644 --- a/components/updates/PostPreview.js +++ b/components/updates/PostPreview.js @@ -7,7 +7,7 @@ export default function PostPreview(props) { <Link href={`/updates/${props.slug}`}> <h2 className="font-medium text-2xl hover:underline">{props.title}</h2> </Link> - <span>By {props.author}</span> + <span className="text-sm">{props.author}</span> <p>{props.description}</p> <p className="font-medium text-sm">Posted on {DateFormatter(props.date)}</p> </div> diff --git a/package.json b/package.json index 6c5bfe3..1030dac 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev", + "dev": "next dev --turbo", "build": "next build", "start": "next start", "lint": "next lint" |
