import { CKAN, DatasetSearchForm, ListOfDatasets, PackageSearchOptions, Organization, Group, } from "@portaljs/ckan"; import { useState } from "react"; export async function getServerSideProps() { const ckan = new CKAN("https://demo.dev.datopian.com"); const groups = await ckan.getGroupsWithDetails(); const orgs = await ckan.getOrgsWithDetails(); return { props: { groups, orgs, }, }; } export default function Home({ orgs, groups, }: { orgs: Organization[]; groups: Group[]; }) { const ckan = new CKAN("https://demo.dev.datopian.com"); const [options, setOptions] = useState({ offset: 0, limit: 5, tags: [], groups: [], orgs: [], }); return (
{" "}
); }