import countriesData from './countries.json' assert { type: 'json' }; export const metadata = { title: 'Travel Advisory', description: 'Information whether its safe to travel to other countries', } export async function getCountries(){ const countries = countriesData.countries; return countries.map((country) => { let dangerLevel; switch (country.status) { case 0: dangerLevel = "Take normal security precautions" break; case 1: dangerLevel = "Exercise a high degree of caution" break; case 2: dangerLevel = "Avoid non-essential travel" break; case 3: dangerLevel = "Avoid all travel" break; } return (

{country.name}

{dangerLevel}

City 1

Take normal security precautions

City 2

Take normal security precautions

City 3

Take normal security precautions

City 4

Take normal security precautions

) }) } export default async function TravelAdvisory(){ const countries = await getCountries(); return (

{metadata.title}

{metadata.description}

Legend

This page may be inaccurate at times, refer to the Minecraft General Announcements channel for the latest updates

{ /*

Country name

Take normal security precautions

*/ } {countries}
) }