import getConfig from 'next/config'; import styles from './index.module.css'; const dms = getConfig().publicRuntimeConfig.DMS const formatter = new Intl.DateTimeFormat('en-US', { year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric', timeZone: 'UTC', }); export async function getServerSideProps() { const response = await fetch(`${dms}/api/3/action/package_search`) const datasets = await response.json() const datasetsWithDetails = await Promise.all(datasets.result.results.map(async (dataset) => { const response = await fetch(`${dms}/api/3/action/package_show?id=` + dataset.name) const json = await response.json() return json.result })) return { props: { datasets: datasetsWithDetails } } } export function Index({ datasets }) { return (

My Datasets

Here is a list of all my datasets for easy access and sharing, they are all available in the following{' '} CKAN Instance

{datasets.map((dataset) => ( ))}
Title Description Last updated
{dataset.title} {dataset.notes} {formatter.format( new Date(dataset.metadata_modified) )} More info
); } export default Index;