import Head from 'next/head' import Link from 'next/link' import styles from '/styles/Home.module.css' import fsPromises from 'fs/promises' import path from 'path' import type { CustomLink, EntryList } from '../interfaces/LinkTypes' function Servers(props: EntryList) { const serverList = props.games return ( <> Neshura Servers

Server List

Lists all available Services, probably up-to-date

{Object.values(serverList).map((item: CustomLink) => { if (item.href != null) { return (

{item.name }

{item.desc}

{item.ip }

{item.status}

) } else { return (

{item.name }

{item.desc}

{item.ip}

{item.status}

) } } )}
) } export async function getServerSideProps() { const filePath = path.join(process.cwd(), '/public/pages.json') const jsonData = await fsPromises.readFile(filePath) const list = JSON.parse(jsonData.toString()) return { props: list } } export default Servers