import Head from 'next/head'
import fsPromises from 'fs/promises'
import path from 'path'
import type { CustomLink, EntryList } from '../interfaces/LinkTypes'
import { PageContentBox, PageCard, PageDescription, PageTitle, CardContentGame } from '../components/styles/content'
import Link from 'next/link'
function Servers(props: EntryList) {
const serverList = props.games
return (
<>
Neshweb - Games
Server List
Lists all available Services, probably up-to-date
{Object.values(serverList).map((item: CustomLink) => {
if (item.href != null) {
return (
)
}
else {
return (
)
}
}
)}
>
)
}
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