Merge pull request #534 from datopian/update/link

[examples-ssc][s]: update dataset link and path
This commit is contained in:
Rising Odegua 2021-04-14 12:33:55 +01:00 committed by GitHub
commit 72bb504135
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,12 +1,13 @@
import path from 'path'
import Head from 'next/head'
import Link from 'next/link'
import Table from '../components/Table'
import filesize from 'filesize'
import { Vega } from 'react-vega';
import { getDataset } from '../lib/dataset'
import Chart from '../components/Chart'
import { addView } from '../lib/utils'
const datasetsDirectory = process.env.PORTAL_DATASET_PATH || path.join(process.cwd(), "fixtures", "datasetsDoubleView")
const datasetsDirectory = process.env.PORTAL_DATASET_PATH || path.join(process.cwd(), "public", "dataset")
export default function Home({ dataset, specs }) {
@ -144,9 +145,11 @@ export default function Home({ dataset, specs }) {
</div>
<div>
<h3 className="text-1xl">
<a className="text-yellow-600" href={`/dataset/${resource.path}`}>
{resource.format} ({filesize(resource.size, { bits: true })})
<Link href={`/dataset/${resource.path}`}>
<a className="text-yellow-600">
{resource.format} ({filesize(resource.size, { bits: true })})
</a>
</Link>
</h3>
</div>
</div>