diff --git a/examples/catalog/components/dataset/Resources.tsx b/examples/catalog/components/dataset/Resources.tsx index d43d8e80..43697ce4 100644 --- a/examples/catalog/components/dataset/Resources.tsx +++ b/examples/catalog/components/dataset/Resources.tsx @@ -2,6 +2,7 @@ /* eslint-disable react/display-name */ import Link from 'next/link'; import { useQuery } from '@apollo/react-hooks'; +import * as timeago from 'timeago.js'; import { Table, ErrorMessage } from '../_shared'; import { GET_RESOURCES_QUERY } from '../../graphql/queries'; @@ -22,10 +23,12 @@ const columns = [ { name: 'Created', key: 'created', + render: ({ created }) => timeago.format(created), }, { name: 'Updated', - key: 'last_modified', + key: 'updated', + render: ({ updated }) => timeago.format(updated), }, { name: 'Link', diff --git a/examples/catalog/graphql/queries.ts b/examples/catalog/graphql/queries.ts index d32c482e..67e93306 100644 --- a/examples/catalog/graphql/queries.ts +++ b/examples/catalog/graphql/queries.ts @@ -41,7 +41,7 @@ export const GET_RESOURCES_QUERY = gql` title format created - last_modified + updated: last_modified } } }