From 7a17f4843dcb2b462bfd9928879e18124148079b Mon Sep 17 00:00:00 2001 From: anuveyatsu Date: Sun, 15 Aug 2021 00:31:57 +0600 Subject: [PATCH] [catalog/setup][xs]: updates for deployment. - Set DMS to demo.dev.datopian.com which has more datasets than demo.ckan.org. - Fix typesript bug which was breaking previous deployment. - Update yarn.lock file so that 'portal' is installed from the latest commit. --- examples/catalog/next.config.js | 2 +- examples/catalog/pages/[org]/index.tsx | 2 +- examples/catalog/yarn.lock | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/catalog/next.config.js b/examples/catalog/next.config.js index f4e559a2..cdd27f16 100644 --- a/examples/catalog/next.config.js +++ b/examples/catalog/next.config.js @@ -41,7 +41,7 @@ module.exports = (phase, { defaultConfig }) => { defaultLocale: 'en', }, publicRuntimeConfig: { - DMS: dms ? dms.replace(/\/?$/, '') : 'https://demo.ckan.org', + DMS: dms ? dms.replace(/\/?$/, '') : 'https://demo.dev.datopian.com', CMS: cms ? cms.replace(/\/?$/, '') : 'oddk.home.blog', }, }; diff --git a/examples/catalog/pages/[org]/index.tsx b/examples/catalog/pages/[org]/index.tsx index 79d5c867..4012c756 100644 --- a/examples/catalog/pages/[org]/index.tsx +++ b/examples/catalog/pages/[org]/index.tsx @@ -30,7 +30,7 @@ const Org: React.FC<{ variables: any }> = ({ variables }) => { export const getServerSideProps: GetServerSideProps = async (context) => { const apolloClient = initializeApollo(); const variables = { - id: context.query.org.replace('@', ''), + id: (context.query.org as string).replace('@', ''), }; await apolloClient.query({ diff --git a/examples/catalog/yarn.lock b/examples/catalog/yarn.lock index 2964ec4e..e763ad19 100644 --- a/examples/catalog/yarn.lock +++ b/examples/catalog/yarn.lock @@ -14152,7 +14152,7 @@ popper.js@1.16.1-lts: "portal@https://github.com/datopian/portal.js": version "0.1.0" - resolved "https://github.com/datopian/portal.js#b103b0e845d0e43c6b6f7d602af972423ea4c012" + resolved "https://github.com/datopian/portal.js#4dfaaad85eb4775f890bd9e87493f37a90a211f0" dependencies: "@material-ui/core" "^4.11.3" "@material-ui/data-grid" "^4.0.0-alpha.20" @@ -14164,6 +14164,7 @@ popper.js@1.16.1-lts: react-plotly.js "^2.5.1" react-scripts "3.4.3" tailwindcss "^2.0.2" + timeago.js "^4.0.2" portfinder@^1.0.26: version "1.0.28"