[examples/ckan][m] - add DMS option
This commit is contained in:
@@ -6,10 +6,13 @@ import {
|
||||
Organization,
|
||||
Group,
|
||||
} from "@portaljs/ckan";
|
||||
import getConfig from "next/config";
|
||||
import { useState } from "react";
|
||||
|
||||
const backend_url = getConfig().publicRuntimeConfig.DMS
|
||||
|
||||
export async function getServerSideProps() {
|
||||
const ckan = new CKAN("https://demo.dev.datopian.com");
|
||||
const ckan = new CKAN(backend_url);
|
||||
const groups = await ckan.getGroupsWithDetails();
|
||||
const orgs = await ckan.getOrgsWithDetails();
|
||||
return {
|
||||
@@ -27,7 +30,7 @@ export default function Home({
|
||||
orgs: Organization[];
|
||||
groups: Group[];
|
||||
}) {
|
||||
const ckan = new CKAN("https://demo.dev.datopian.com");
|
||||
const ckan = new CKAN(backend_url);
|
||||
const [options, setOptions] = useState<PackageSearchOptions>({
|
||||
offset: 0,
|
||||
limit: 5,
|
||||
|
||||
Reference in New Issue
Block a user