diff --git a/src/components/ResourcePreview/index.jsx b/src/components/ResourcePreview/index.jsx
index 1ebad938..f283810f 100644
--- a/src/components/ResourcePreview/index.jsx
+++ b/src/components/ResourcePreview/index.jsx
@@ -47,7 +47,7 @@ const ResourceContent = ({tablePadding, id, options}) => {
data={value.items}
columns={prepareColumns(value.columns, value.schema[id])}
schema={value.schema}
- totalRows={value.totalRows}
+ totalRows={parseInt(value.totalRows)}
limit={value.limit}
offset={value.offset}
loading={value.loading}
diff --git a/src/index.js b/src/index.js
index 4b8a5dfd..1d463a9d 100644
--- a/src/index.js
+++ b/src/index.js
@@ -17,6 +17,7 @@ export { default as Breadcrumb } from './components/Breadcrumb';
export { default as TransformedDate } from './components/TransformedDate';
// Templates
+export { default as PageNotFound } from './templates/PageNotFound';
export { default as Footer } from './templates/Footer';
export { default as Dataset } from './templates/Dataset';
export { default as DatasetSearch } from './templates/DatasetSearch';
diff --git a/src/styles/scss/templates/footer.scss b/src/styles/scss/templates/footer.scss
index 45e69eea..8367b87d 100644
--- a/src/styles/scss/templates/footer.scss
+++ b/src/styles/scss/templates/footer.scss
@@ -2,6 +2,7 @@
.dc-c-footer {
background-color: white;
+ padding-top: 100px;
ul {
margin: 0;
padding: 0;
diff --git a/src/templates/APIPage/index.jsx b/src/templates/APIPage/index.jsx
index f350efc5..827df187 100644
--- a/src/templates/APIPage/index.jsx
+++ b/src/templates/APIPage/index.jsx
@@ -1,9 +1,9 @@
import React from 'react';
-import { ApiDocs } from "@civicactions/data-catalog-components";
+import SwaggerUI from 'swagger-ui-react';
const APIPage = () => (
);
diff --git a/src/templates/Dataset/index.jsx b/src/templates/Dataset/index.jsx
index 15edddbe..2a84db91 100644
--- a/src/templates/Dataset/index.jsx
+++ b/src/templates/Dataset/index.jsx
@@ -1,7 +1,7 @@
import React, { useState, useRef } from 'react';
import PropTypes from 'prop-types';
-import { ApiDocs } from "@civicactions/data-catalog-components";
-import { useMetastoreDataset, Resource, prepareColumns } from '@civicactions/data-catalog-services';
+import SwaggerUI from 'swagger-ui-react';
+import { useMetastoreDataset, Resource } from '@civicactions/data-catalog-services';
import { Badge, Button } from '@cmsgov/design-system';
import ResourcePreview from '../../components/ResourcePreview';
import ResourceHeader from '../../components/ResourceHeader';
@@ -17,7 +17,11 @@ const Dataset = ({ id, rootUrl }) => {
limit: 10
}
const [tablePadding, setTablePadding] = useState('ds-u-padding-y--1')
- const { dataset, } = useMetastoreDataset(id, rootUrl);
+ const metastore = useMetastoreDataset(id, rootUrl);
+ const { dataset, } = metastore;
+
+ console.log(metastore)
+
const rawDate = new Date(dataset.modified);
let modifiedDate = '';
let options = { year: 'numeric', month: 'long', day: 'numeric' };
@@ -61,10 +65,7 @@ const Dataset = ({ id, rootUrl }) => {
{dataset.identifier &&
}
diff --git a/src/templates/DatasetSearch/index.jsx b/src/templates/DatasetSearch/index.jsx
index 7591bbfa..37154caa 100644
--- a/src/templates/DatasetSearch/index.jsx
+++ b/src/templates/DatasetSearch/index.jsx
@@ -1,4 +1,4 @@
-import React, { useState } from 'react';
+import React, { useEffect, useState } from 'react';
import qs from 'qs';
import { SearchPaginationResults } from '@civicactions/data-catalog-components';
import { useSearchAPI, separateFacets } from '@civicactions/data-catalog-services';
@@ -44,7 +44,7 @@ export function transformUrlParamsToSearchObject(searchParams, facetList) {
const DatasetSearch = ({rootUrl, location}) => {
- console.log(decodeURI(location.search))
+ const [currentResultNumbers, setCurrentResultNumbers] = useState(null)
const {
fulltext,
selectedFacets,
@@ -73,7 +73,16 @@ const DatasetSearch = ({rootUrl, location}) => {
const searchParams = updateUrl(selectedFacets, fulltext, sort)
window.history.pushState({}, '', `${url.origin}${url.pathname}${searchParams}`);
},[fulltext, selectedFacets, sort])
-
+ useEffect(() => {
+ const baseNumber = Number(totalItems) > 0 ? 1 : 0;
+ const startingNumber = baseNumber + ((Number(pageSize) * Number(page + 1)) - Number(pageSize))
+ const endingNumber = (Number(pageSize) * Number(page + 1));
+ setCurrentResultNumbers({
+ total: Number(totalItems),
+ startingNumber: startingNumber,
+ endingNumber: endingNumber
+ })
+ }, [totalItems, pageSize, page])
return(
@@ -105,10 +114,18 @@ const DatasetSearch = ({rootUrl, location}) => {
Search
-
-
- {selectedFacetsMessage(selectedFacets, {theme: 'Categories', keyword: 'Tags'})}
-
+
+
+ {currentResultNumbers
+ && (
+
Showing {currentResultNumbers.startingNumber} - {currentResultNumbers.endingNumber} of {currentResultNumbers.total} datasets
+ )
+ }
+
+ {selectedFacetsMessage(selectedFacets, {theme: 'Categories', keyword: 'Tags'})}
+
+
+
- {/*
{`[${items.length} ${items.length === 1 ? 'entry' : 'entries'} total on page]`}
*/}
- {/*
*/}
-
{items.map((item) => (
-
diff --git a/src/templates/Footer/index.jsx b/src/templates/Footer/index.jsx
index 335083cf..10e0ec9b 100644
--- a/src/templates/Footer/index.jsx
+++ b/src/templates/Footer/index.jsx
@@ -31,7 +31,7 @@ const Footer = ({
{emailBody}
- {/* */}
+