diff --git a/.babelrc b/.babelrc index e49a7e65..1ff94f7e 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,3 @@ { "presets": ["next/babel"] -} \ No newline at end of file +} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..168d4b12 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,24 @@ +node_modules/ + +# testing +/coverage + +# next.js +.next/ +/out/ + +# yarn +yarn-error.log +yarn.lock + +# sass +.sass-cache + +# misc +sandbox/* +.env +.staging.env +.nyc_output/* +.DS_Store + +public/ diff --git a/README.md b/README.md index 91a4a99d..34db430d 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ `Portal` assumes a "decoupled" approach where the frontend is a separate service from the backend and interacts with backend(s) via an API. It can be used with any backend and has out of the box support for [CKAN][]. `portal` is built in Javascript and React on top of the popular [Next.js][] framework. -[CKAN]: https://ckan.org/ -[Next.js]: https://nextjs.com/ +[ckan]: https://ckan.org/ +[next.js]: https://nextjs.com/ Live DEMO: https://portal.datopian1.now.sh @@ -22,13 +22,12 @@ npm init portal-app my-data-portal ``` > NB: Under the hood, this uses the tool called create-next-app, which bootstraps a Next.js app for you. It uses this template through the --example flag. -> +> > If it doesn’t work, please open an issue. - ## Guide -### Styling :art: +### Styling :art: We use Tailwind as a CSS framework. Take a look at `/styles/index.css` to see what we're importing from Tailwind bundle. You can also configure Tailwind using `tailwind.config.js` file. @@ -49,13 +48,13 @@ $ export CMS=http://myblog.wordpress.com These are the default routes set up in the "starter" app. -* Home `/` -* Search `/search` -* Dataset `/@org/dataset` -* Resource `/@org/dataset/r/resource` -* Organization `/@org` -* Collection (aka group in CKAN) (?) - suggest to merge into org -* Static pages, eg, `/about` etc. from CMS or can do it without external CMS, e.g., in Next.js +- Home `/` +- Search `/search` +- Dataset `/@org/dataset` +- Resource `/@org/dataset/r/resource` +- Organization `/@org` +- Collection (aka group in CKAN) (?) - suggest to merge into org +- Static pages, eg, `/about` etc. from CMS or can do it without external CMS, e.g., in Next.js ### New Routes @@ -77,11 +76,10 @@ Boot the demo portal: $ yarn dev # or npm run dev ``` -Open [http://localhost:3000](http://localhost:3000) to see the home page :tada: +Open [http://localhost:3000](http://localhost:3000) to see the home page :tada: You can start editing the page by modifying `/pages/index.tsx`. The page auto-updates as you edit the file. - ### Tests We use Jest for running tests: diff --git a/__tests__/components/search/Total.test.tsx b/__tests__/components/search/Total.test.tsx index a30f60a0..2511ebb0 100644 --- a/__tests__/components/search/Total.test.tsx +++ b/__tests__/components/search/Total.test.tsx @@ -1,9 +1,9 @@ -import React from 'react' -import { render } from '@testing-library/react' -import renderer from 'react-test-renderer' -import Total from '../../../components/search/Total' +import React from 'react'; +import { render } from '@testing-library/react'; +import renderer from 'react-test-renderer'; +import Total from '../../../components/search/Total'; -test('📸 of Total component', () => { - const tree = renderer.create().toJSON() - expect(tree).toMatchSnapshot() -}) +test('📸 of Total component', () => { + const tree = renderer.create().toJSON(); + expect(tree).toMatchSnapshot(); +}); diff --git a/__tests__/pages/index.test.tsx b/__tests__/pages/index.test.tsx index d86cfebd..69ff7501 100644 --- a/__tests__/pages/index.test.tsx +++ b/__tests__/pages/index.test.tsx @@ -1,17 +1,15 @@ -import React from 'react' -import { render } from '@testing-library/react' -import renderer from 'react-test-renderer' -import Index from '../../pages/index' +import React from 'react'; +import { render } from '@testing-library/react'; +import renderer from 'react-test-renderer'; +import Index from '../../pages/index'; -test('📸 of Home page', () => { - const tree = renderer.create().toJSON() - expect(tree).toMatchSnapshot() -}) +test('📸 of Home page', () => { + const tree = renderer.create().toJSON(); + expect(tree).toMatchSnapshot(); +}); test('renders text from hero section', () => { - const { getByText } = render() - const linkElement = getByText( - /Find, Share and Publish/ - ) - expect(linkElement).toBeInTheDocument() -}) + const { getByText } = render(); + const linkElement = getByText(/Find, Share and Publish/); + expect(linkElement).toBeInTheDocument(); +}); diff --git a/components/dataset/About.tsx b/components/dataset/About.tsx index 663ab14b..9aac13db 100644 --- a/components/dataset/About.tsx +++ b/components/dataset/About.tsx @@ -15,22 +15,16 @@ export default function About({ datapackage }) { - { datapackage.resources.length } - { datapackage.size || 'N\A' } - - - - { datapackage.created } - { datapackage.modified } - - - - - - + {datapackage.resources.length} + {datapackage.size || 'NA'} + + {datapackage.created} + {datapackage.modified} + + - ) + ); } diff --git a/components/dataset/Org.tsx b/components/dataset/Org.tsx index af495681..0971532c 100644 --- a/components/dataset/Org.tsx +++ b/components/dataset/Org.tsx @@ -1,17 +1,26 @@ -import Link from 'next/link' +import Link from 'next/link'; export default function Org({ org }) { return ( <> - {org - ? <> - + {org ? ( + <> + - { org.title || org.name } + + {org.title || org.name} + - : '' - } + ) : ( + '' + )} - ) + ); } diff --git a/components/dataset/Resources.tsx b/components/dataset/Resources.tsx index b492eba0..e4753de1 100644 --- a/components/dataset/Resources.tsx +++ b/components/dataset/Resources.tsx @@ -1,4 +1,4 @@ -import Link from 'next/link' +import Link from 'next/link'; export default function Resources({ datapackage }) { return ( @@ -16,25 +16,24 @@ export default function Resources({ datapackage }) { {datapackage.resources.map((resource, index) => ( - - - - { resource.title || resource.name } - - - { resource.format } - { resource.created } - { resource.last_modified } - - - Preview - - - - ) - )} + + + + {resource.title || resource.name} + + + {resource.format} + {resource.created} + {resource.last_modified} + + + Preview + + + + ))} - ) + ); } diff --git a/components/home/Nav.tsx b/components/home/Nav.tsx index 07527dce..ea671b02 100644 --- a/components/home/Nav.tsx +++ b/components/home/Nav.tsx @@ -1,13 +1,13 @@ -import Link from 'next/link' -import React, { useState } from 'react' +import Link from 'next/link'; +import React, { useState } from 'react'; export default function Nav() { - const [open, setOpen] = useState(false) + const [open, setOpen] = useState(false); const handleClick = (event) => { - event.preventDefault() - setOpen(!open) - } + event.preventDefault(); + setOpen(!open); + }; return ( - ) + ); } diff --git a/components/home/Recent.tsx b/components/home/Recent.tsx index 1cf0de97..fc02cd50 100644 --- a/components/home/Recent.tsx +++ b/components/home/Recent.tsx @@ -1,4 +1,4 @@ -import Link from 'next/link' +import Link from 'next/link'; export default function Recent() { return ( @@ -8,28 +8,46 @@ export default function Recent() {

Our World in Data - COVID 19

Dataset

-

data collected and managed by Our World in Data - COVID 19 pulled from GitHub on 06/10/2020 https://ourworldindata.org/coronavirus

+

+ data collected and managed by Our World in Data - COVID 19 pulled + from GitHub on 06/10/2020 https://ourworldindata.org/coronavirus +

- View Dataset + + {' '} + View Dataset{' '} +

Our World in Data - COVID 19

Dataset

-

data collected and managed by Our World in Data - COVID 19 pulled from GitHub on 06/10/2020 https://ourworldindata.org/coronavirus

+

+ data collected and managed by Our World in Data - COVID 19 pulled + from GitHub on 06/10/2020 https://ourworldindata.org/coronavirus +

- View Dataset + + {' '} + View Dataset{' '} +

Our World in Data - COVID 19

Dataset

-

data collected and managed by Our World in Data - COVID 19 pulled from GitHub on 06/10/2020 https://ourworldindata.org/coronavirus

+

+ data collected and managed by Our World in Data - COVID 19 pulled + from GitHub on 06/10/2020 https://ourworldindata.org/coronavirus +

- View Dataset + + {' '} + View Dataset{' '} +
- ) + ); } diff --git a/components/resource/About.tsx b/components/resource/About.tsx index a0b8ea53..e4a28423 100644 --- a/components/resource/About.tsx +++ b/components/resource/About.tsx @@ -1,4 +1,4 @@ -import Link from 'next/link' +import Link from 'next/link'; export default function About({ resource }) { return ( @@ -18,21 +18,23 @@ export default function About({ resource }) { - { resource.name || resource.id } - { resource.title || '' } - { resource.description || '' } - { resource.format } - { resource.size } - { resource.created } - { resource.last_modified || '' } + {resource.name || resource.id} + {resource.title || ''} + {resource.description || ''} + {resource.format} + {resource.size} + {resource.created} + {resource.last_modified || ''} - { resource.format } + + {resource.format} + - ) + ); } diff --git a/components/resource/DataExplorer.tsx b/components/resource/DataExplorer.tsx index fd911dc5..6f2fbd8a 100644 --- a/components/resource/DataExplorer.tsx +++ b/components/resource/DataExplorer.tsx @@ -1,5 +1,5 @@ -import Link from 'next/link' +import Link from 'next/link'; export default function DataExplorer({ resource }) { - return <>{JSON.stringify(resource)} + return <>{JSON.stringify(resource)}; } diff --git a/components/search/Input.tsx b/components/search/Input.tsx index c6ccf922..81c53244 100644 --- a/components/search/Input.tsx +++ b/components/search/Input.tsx @@ -1,35 +1,40 @@ -import { useState } from 'react' -import { useRouter } from 'next/router' -import Link from 'next/link' +import { useState } from 'react'; +import { useRouter } from 'next/router'; +import Link from 'next/link'; export default function Input({ query }) { - const router = useRouter() - const [q, setQ] = useState(query.q) + const router = useRouter(); + const [q, setQ] = useState(query.q); const handleChange = (event) => { - setQ(event.target.value) - } + setQ(event.target.value); + }; const handleSubmit = (event) => { - event.preventDefault() + event.preventDefault(); router.push({ pathname: '/search', query: { q }, - }) - } + }); + }; return (
- + type="text" + name="q" + value={q} + onChange={handleChange} + placeholder="Search" + aria-label="Search" + className="bg-white focus:outline-none focus:shadow-outline border border-gray-300 w-1/2 rounded-lg py-2 px-4 block appearance-none leading-normal" + /> +
- ) + ); } diff --git a/components/search/Item.tsx b/components/search/Item.tsx index deb5b458..cde01fd0 100644 --- a/components/search/Item.tsx +++ b/components/search/Item.tsx @@ -1,21 +1,31 @@ -import Link from 'next/link' +import Link from 'next/link'; export default function Item({ datapackage }) { return ( - ) + ); } diff --git a/components/search/List.tsx b/components/search/List.tsx index 918bd343..e0e33199 100644 --- a/components/search/List.tsx +++ b/components/search/List.tsx @@ -1,9 +1,11 @@ -import Item from './Item' +import Item from './Item'; export default function List({ datapackages }) { return (
    - {datapackages.map((datapackage, index) => )} + {datapackages.map((datapackage, index) => ( + + ))}
- ) + ); } diff --git a/components/search/Sort.tsx b/components/search/Sort.tsx index 71893eed..d09e476c 100644 --- a/components/search/Sort.tsx +++ b/components/search/Sort.tsx @@ -10,5 +10,5 @@ export default function Sort() { - ) + ); } diff --git a/components/search/Total.tsx b/components/search/Total.tsx index 083d00a4..e370af1c 100644 --- a/components/search/Total.tsx +++ b/components/search/Total.tsx @@ -1,7 +1,7 @@ export default function Total({ total }) { return (

- { total } results found + {total} results found

- ) + ); } diff --git a/config/index.js b/config/index.js index de08d71a..dd7c03c5 100644 --- a/config/index.js +++ b/config/index.js @@ -1,15 +1,14 @@ -'use strict' +'use strict'; -const nconf = require('nconf') -require('dotenv').config({path: process.env.DOTENV_PATH || '.env'}) +const nconf = require('nconf'); +require('dotenv').config({ path: process.env.DOTENV_PATH || '.env' }); -nconf.argv() - .env() +nconf.argv().env(); -nconf.use('memory') +nconf.use('memory'); -const dms = (process.env.DMS || 'http://mock.ckan').replace(/\/?$/, '') -const cms = (process.env.CMS || 'http://mock.cms').replace(/\/?$/, '') +const dms = (process.env.DMS || 'http://mock.ckan').replace(/\/?$/, ''); +const cms = (process.env.CMS || 'http://mock.cms').replace(/\/?$/, ''); // This is the object that you want to override in your own local config nconf.defaults({ @@ -17,10 +16,10 @@ nconf.defaults({ debug: process.env.DEBUG || false, DMS: dms, CMS: cms, -}) +}); module.exports = { get: nconf.get.bind(nconf), set: nconf.set.bind(nconf), - reset: nconf.reset.bind(nconf) -} + reset: nconf.reset.bind(nconf), +}; diff --git a/config/jest/cssTransform.js b/config/jest/cssTransform.js index 48d69661..6f1e7146 100644 --- a/config/jest/cssTransform.js +++ b/config/jest/cssTransform.js @@ -1,8 +1,8 @@ module.exports = { process() { - return 'module.exports = {};' + return 'module.exports = {};'; }, getCacheKey() { - return 'cssTransform' + return 'cssTransform'; }, -} \ No newline at end of file +}; diff --git a/jest.config.js b/jest.config.js index b639f1ef..f6c71d3d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,29 +1,29 @@ module.exports = { collectCoverageFrom: [ - "**/*.{js,jsx,ts,tsx}", - "!**/*.d.ts", - "!**/node_modules/**", - "!**/config/**", - "!**/coverage/**", - "!**/**.config.js**", + '**/*.{js,jsx,ts,tsx}', + '!**/*.d.ts', + '!**/node_modules/**', + '!**/config/**', + '!**/coverage/**', + '!**/**.config.js**', ], - setupFilesAfterEnv: ["/setupTests.js"], + setupFilesAfterEnv: ['/setupTests.js'], testPathIgnorePatterns: [ - "/node_modules/", - "/.next/", - "/jest.config.js/", - "/tailwind.config.js/", - "/postcss.config.js", + '/node_modules/', + '/.next/', + '/jest.config.js/', + '/tailwind.config.js/', + '/postcss.config.js', ], transform: { - "^.+\\.(js|jsx|ts|tsx)$": "/node_modules/babel-jest", - "^.+\\.css$": "/config/jest/cssTransform.js", + '^.+\\.(js|jsx|ts|tsx)$': '/node_modules/babel-jest', + '^.+\\.css$': '/config/jest/cssTransform.js', }, transformIgnorePatterns: [ - "/node_modules/", - "^.+\\.module\\.(css|sass|scss)$", + '/node_modules/', + '^.+\\.module\\.(css|sass|scss)$', ], moduleNameMapper: { - "^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy", + '^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy', }, }; diff --git a/mocks/index.js b/mocks/index.js index 9202ea0c..17c11e04 100644 --- a/mocks/index.js +++ b/mocks/index.js @@ -1,142 +1,146 @@ -const nock = require('nock') +const nock = require('nock'); const gdp = { - "name": "gdp", - "title": "Country, Regional and World GDP (Gross Domestic Product)", - "notes": "Country, regional and world GDP in current US Dollars ($). Regional means collections of countries e.g. Europe & Central Asia. Data is sourced from the World Bank and turned into a standard normalized CSV.", - "resources": [ + name: 'gdp', + title: 'Country, Regional and World GDP (Gross Domestic Product)', + notes: + 'Country, regional and world GDP in current US Dollars ($). Regional means collections of countries e.g. Europe & Central Asia. Data is sourced from the World Bank and turned into a standard normalized CSV.', + resources: [ { - "name": "gdp", - "id": "gdp", - "title": "GDP data", - "format": "csv", - "created": "2019-03-07T12:00:36.273495", - "last_modified": "2020-05-07T12:00:36.273495", - "datastore_active": false, - "url": "http://mock.filestore/gdp.csv" - } + name: 'gdp', + id: 'gdp', + title: 'GDP data', + format: 'csv', + created: '2019-03-07T12:00:36.273495', + last_modified: '2020-05-07T12:00:36.273495', + datastore_active: false, + url: 'http://mock.filestore/gdp.csv', + }, ], - "organization": { - "title": "World Bank", - "name": "world-bank", - "description": "The World Bank is an international financial institution that provides loans and grants to the governments of poorer countries for the purpose of pursuing capital projects.", - "created": "2019-03-07T11:51:13.758844", - "image_url": "https://github.com/datahq/frontend/raw/master/public/img/avatars/world-bank.jpg" + organization: { + title: 'World Bank', + name: 'world-bank', + description: + 'The World Bank is an international financial institution that provides loans and grants to the governments of poorer countries for the purpose of pursuing capital projects.', + created: '2019-03-07T11:51:13.758844', + image_url: + 'https://github.com/datahq/frontend/raw/master/public/img/avatars/world-bank.jpg', }, - "metadata_created": "2019-03-07T11:56:19.696257", - "metadata_modified": "2019-03-07T12:03:58.817280" -} + metadata_created: '2019-03-07T11:56:19.696257', + metadata_modified: '2019-03-07T12:03:58.817280', +}; const population = { - "name": "population", - "title": "World population data", - "notes": "Population figures for countries, regions (e.g. Asia) and the world. Data comes originally from World Bank and has been converted into standard CSV.", - "resources": [ + name: 'population', + title: 'World population data', + notes: + 'Population figures for countries, regions (e.g. Asia) and the world. Data comes originally from World Bank and has been converted into standard CSV.', + resources: [ { - "name": "population", - "id": "population", - "title": "Population data", - "format": "csv", - "created": "2019-03-07T12:00:36.273495", - "last_modified": "2020-05-07T12:00:36.273495", - "datastore_active": true, - "url": "http://mock.filestore/population.csv" - } + name: 'population', + id: 'population', + title: 'Population data', + format: 'csv', + created: '2019-03-07T12:00:36.273495', + last_modified: '2020-05-07T12:00:36.273495', + datastore_active: true, + url: 'http://mock.filestore/population.csv', + }, ], - "organization": { - "title": "World Bank", - "name": "world-bank", - "description": "The World Bank is an international financial institution that provides loans and grants to the governments of poorer countries for the purpose of pursuing capital projects.", - "created": "2019-03-07T11:51:13.758844", - "image_url": "https://github.com/datahq/frontend/raw/master/public/img/avatars/world-bank.jpg" - } -} + organization: { + title: 'World Bank', + name: 'world-bank', + description: + 'The World Bank is an international financial institution that provides loans and grants to the governments of poorer countries for the purpose of pursuing capital projects.', + created: '2019-03-07T11:51:13.758844', + image_url: + 'https://github.com/datahq/frontend/raw/master/public/img/avatars/world-bank.jpg', + }, +}; -module.exports.initMocks = function() { +module.exports.initMocks = function () { // Uncomment this line if you want to record API calls // nock.recorder.rec() - // "package_search" mocks - nock('http://mock.ckan/api/3/action', {'encodedQueryParams':true}) + nock('http://mock.ckan/api/3/action', { encodedQueryParams: true }) .persist() // 1. Call without query. - .get('/package_search?facet.field=organization&facet.field=groups&facet.field=tags&facet.field=res_format&facet.field=license_id&facet.limit=5') + .get( + '/package_search?facet.field=organization&facet.field=groups&facet.field=tags&facet.field=res_format&facet.field=license_id&facet.limit=5' + ) .reply(200, { - "success": true, - "result": { - "count": 2, - "sort": "score desc, metadata_modified desc", - "facets": {}, - "results": [ - gdp, - population - ], - "search_facets": {} - } + success: true, + result: { + count: 2, + sort: 'score desc, metadata_modified desc', + facets: {}, + results: [gdp, population], + search_facets: {}, + }, }) // 2. Call with `q=gdp` query. - .get('/package_search?q=gdp&facet.field=organization&facet.field=groups&facet.field=tags&facet.field=res_format&facet.field=license_id&facet.limit=5') + .get( + '/package_search?q=gdp&facet.field=organization&facet.field=groups&facet.field=tags&facet.field=res_format&facet.field=license_id&facet.limit=5' + ) .reply(200, { - "success": true, - "result": { - "count": 1, - "sort": "score desc, metadata_modified desc", - "facets": {}, - "results": [ - gdp - ], - "search_facets": {} - } - }) + success: true, + result: { + count: 1, + sort: 'score desc, metadata_modified desc', + facets: {}, + results: [gdp], + search_facets: {}, + }, + }); // "package_show" mocks - nock('http://mock.ckan/api/3/action', {'encodedQueryParams':true}) + nock('http://mock.ckan/api/3/action', { encodedQueryParams: true }) .persist() .get('/package_show?id=gdp') .reply(200, { - "success": true, - "result": gdp + success: true, + result: gdp, }) .get('/package_show?id=population') .reply(200, { - "success": true, - "result": population - }) + success: true, + result: population, + }); // "datastore_search" mocks - nock('http://mock.ckan/api/3/action', {'encodedQueryParams':true}) + nock('http://mock.ckan/api/3/action', { encodedQueryParams: true }) .persist() .get('/datastore_search?resource_id=population') .reply(200, { - "success": true, - "result": { - "records": [ + success: true, + result: { + records: [ { - "Country Code": "ARB", - "Country Name": "Arab World", - "Value": 92197753, - "Year": 1960 + 'Country Code': 'ARB', + 'Country Name': 'Arab World', + Value: 92197753, + Year: 1960, }, { - "Country Code": "ARB", - "Country Name": "Arab World", - "Value": 94724510, - "Year": 1961 + 'Country Code': 'ARB', + 'Country Name': 'Arab World', + Value: 94724510, + Year: 1961, }, { - "Country Code": "ARB", - "Country Name": "Arab World", - "Value": 97334442, - "Year": 1962 - } - ] - } - }) + 'Country Code': 'ARB', + 'Country Name': 'Arab World', + Value: 97334442, + Year: 1962, + }, + ], + }, + }); // Filestore mocks - nock('http://mock.filestore', {'encodedQueryParams':true}) + nock('http://mock.filestore', { encodedQueryParams: true }) .persist() .get('/gdp.csv') - .reply(200, 'a,b,c\n1,2,3\n4,5,6\n') -} + .reply(200, 'a,b,c\n1,2,3\n4,5,6\n'); +}; diff --git a/package.json b/package.json index c71b615c..4210fc07 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,9 @@ "start": "next start", "test": "jest", "test:watch": "jest --watch", - "test:coverage": "jest --coverage" + "test:coverage": "jest --coverage", + "format": "prettier --single-quote --write .", + "pre-commit": "echo 'formating your changes.....' && prettier --single-quote --write" }, "dependencies": { "bytes": "^3.1.0", @@ -26,12 +28,23 @@ "@types/react": "^16.9.35", "babel-jest": "^26.0.1", "dotenv": "^8.2.0", + "husky": ">=4", "jest": "^26.0.1", + "lint-staged": ">=10", "nconf": "^0.10.0", "nock": "^12.0.3", "postcss-preset-env": "^6.7.0", + "prettier": "2.0.5", "react-test-renderer": "^16.13.1", "tailwindcss": "^1.4.6", "typescript": "^3.9.3" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.{ts,tsx,js,jsx,css,html,md}": "yarn pre-commit" } } diff --git a/pages/[org]/[dataset]/index.tsx b/pages/[org]/[dataset]/index.tsx index e437bad0..43210a48 100644 --- a/pages/[org]/[dataset]/index.tsx +++ b/pages/[org]/[dataset]/index.tsx @@ -1,11 +1,11 @@ -import { GetServerSideProps } from 'next' -import config from '../../../config' -import utils from '../../../utils' -import Head from 'next/head' -import Nav from '../../../components/home/Nav' -import About from '../../../components/dataset/About' -import Org from '../../../components/dataset/Org' -import Resources from '../../../components/dataset/Resources' +import { GetServerSideProps } from 'next'; +import config from '../../../config'; +import utils from '../../../utils'; +import Head from 'next/head'; +import Nav from '../../../components/home/Nav'; +import About from '../../../components/dataset/About'; +import Org from '../../../components/dataset/Org'; +import Resources from '../../../components/dataset/Resources'; function Dataset({ datapackage }) { return ( @@ -17,21 +17,23 @@ function Dataset({ datapackage }) {