Skip to content

Commit a3bd2e0

Browse files
authored
Merge pull request #220 from CivicDataLab/219-update-opub-version-and-add-link-to-card
219 update opub version and add link to card
2 parents 589a1be + 238ef85 commit a3bd2e0

File tree

6 files changed

+22
-23
lines changed

6 files changed

+22
-23
lines changed

app/[locale]/(user)/datasets/components/FIlter/Filter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const Filter: React.FC<FilterProps> = ({
3333
};
3434

3535
return (
36-
<div className="rounded-4 bg-surfaceDefault px-4 py-6">
36+
<div className="rounded-4 bg-surfaceDefault px-4 py-6 shadow-card">
3737
<div className="mb-5 flex justify-between">
3838
<div className="flex w-full justify-between">
3939
<div>

app/[locale]/(user)/datasets/page.tsx

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
'use client';
22

3-
import React, { useEffect, useReducer, useState } from 'react';
4-
import Link from 'next/link';
5-
import { useRouter } from 'next/navigation';
63
import { fetchDatasets } from '@/fetch';
4+
import { useRouter } from 'next/navigation';
75
import {
86
Button,
97
ButtonGroup,
@@ -17,10 +15,11 @@ import {
1715
Text,
1816
Tray,
1917
} from 'opub-ui';
18+
import React, { useEffect, useReducer, useState } from 'react';
2019

21-
import { cn } from '@/lib/utils';
2220
import BreadCrumbs from '@/components/BreadCrumbs';
2321
import { Icons } from '@/components/icons';
22+
import { cn } from '@/lib/utils';
2423
import GraphqlPagination from '../../dashboard/components/GraphqlPagination/graphqlPagination';
2524
import Filter from './components/FIlter/Filter';
2625
import Styles from './dataset.module.scss';
@@ -243,7 +242,7 @@ const DatasetsListing = () => {
243242
console.log(datasetDetails);
244243

245244
return (
246-
<main className=" bg-greyExtralight">
245+
<main >
247246
<BreadCrumbs
248247
data={[
249248
{ href: '/', label: 'Home' },
@@ -408,7 +407,6 @@ const DatasetsListing = () => {
408407
>
409408
{datasetDetails.map((item: any, index: any) => {
410409
const commonProps = {
411-
key: `${item.id}-${view}`,
412410
title: item.title,
413411
description: item.description,
414412
metadataContent: [
@@ -420,7 +418,7 @@ const DatasetsListing = () => {
420418
{
421419
icon: Icons.download,
422420
label: 'Download',
423-
value: '500',
421+
value: item.download_count.toString(),
424422
},
425423
{
426424
icon: Icons.globe,
@@ -443,15 +441,15 @@ const DatasetsListing = () => {
443441
};
444442

445443
return (
446-
<Link href={`/datasets/${item.id}`} key={item.id}>
447-
<Card
448-
{...commonProps}
449-
variation={
450-
view === 'expanded' ? 'expanded' : 'collapsed'
451-
}
452-
iconColor="warning"
453-
/>
454-
</Link>
444+
<Card
445+
{...commonProps}
446+
key={item.id}
447+
variation={
448+
view === 'expanded' ? 'expanded' : 'collapsed'
449+
}
450+
iconColor="warning"
451+
href={`/datasets/${item.id}`}
452+
/>
455453
);
456454
})}
457455
</GraphqlPagination>

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"next-auth": "^4.24.7",
3636
"next-intl": "^3.4.0",
3737
"next-usequerystate": "^1.17.2",
38-
"opub-ui": "0.3.76",
38+
"opub-ui": "0.3.77",
3939
"react": "^18.2.0",
4040
"react-aria": "3.22.0",
4141
"react-dom": "^18.2.0",

styles/tokens/_variables.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@
307307
--border-width-1: var(--space-025);
308308
--border-width-2: var(--space-05);
309309
--border-width-4: var(--space-1);
310-
310+
--shadow-element-card: 0px 0px 12px 0px rgba(0, 0, 0, 0.16);
311311
--shadow-modal:
312312
0px 26px 80px 0px rgba(0, 0, 0, 0.2), 0px 0px 1px 0px rgba(0, 0, 0, 0.2);
313313
--shadow-layer:

styles/tokens/tailwind/box-shadow.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ module.exports = {
1818
elementCard: 'var(--shadow-element-card)',
1919
elementTopNav: 'var(--shadow-element-topnav)',
2020
elementFocus: 'var(--shadow-element-focus)',
21+
card: 'var(--shadow-element-card)',
2122
};

0 commit comments

Comments
 (0)