Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .eslintrc.js

This file was deleted.

10 changes: 0 additions & 10 deletions .eslintrc.json

This file was deleted.

248 changes: 127 additions & 121 deletions app/[locale]/(user)/collaboratives/CollaborativesListingClient.tsx

Large diffs are not rendered by default.

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions app/[locale]/(user)/collaboratives/[collaborativeSlug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,15 @@ const CollaborativeInfoQuery = graphql(`
export async function generateMetadata({
params,
}: {
params: { collaborativeSlug: string };
params: Promise<{ collaborativeSlug: string }>;
}): Promise<Metadata> {
const { collaborativeSlug } = await params;
try {
const data = await GraphQLPublic(CollaborativeInfoQuery, {}, { pk: params.collaborativeSlug });
const data = await GraphQLPublic(
CollaborativeInfoQuery,
{},
{ pk: collaborativeSlug }
);
const Collaborative = data?.collaborative;

return generatePageMetadata({
Expand All @@ -41,7 +46,7 @@ export async function generateMetadata({
openGraph: {
type: 'article',
locale: 'en_US',
url: `${process.env.NEXT_PUBLIC_PLATFORM_URL}/collaboratives/${params.collaborativeSlug}`,
url: `${process.env.NEXT_PUBLIC_PLATFORM_URL}/collaboratives/${collaborativeSlug}`,
title: `${Collaborative?.title} | Collaborative Data | CivicDataSpace`,
description:
Collaborative?.summary ||
Expand All @@ -59,7 +64,7 @@ export async function generateMetadata({
openGraph: {
type: 'article',
locale: 'en_US',
url: `${process.env.NEXT_PUBLIC_PLATFORM_URL}/collaboratives/${params.collaborativeSlug}`,
url: `${process.env.NEXT_PUBLIC_PLATFORM_URL}/collaboratives/${collaborativeSlug}`,
title: `Collaborative Details | CivicDataSpace`,
description: `Explore open data and curated datasets in this collaborative.`,
siteName: 'CivicDataSpace',
Expand Down
24 changes: 14 additions & 10 deletions app/[locale]/(user)/components/Datasets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,25 +100,29 @@ const Datasets = () => {
description={item.description}
metadataContent={[
{
icon: Icons.calendar,
icon: Icons.calendar as any,
label: 'Date',
value: new Date(item.modified).toLocaleDateString('en-US', {
day: 'numeric',
month: 'long',
year: 'numeric',
}),
value: new Date(item.modified).toLocaleDateString(
'en-US',
{
day: 'numeric',
month: 'long',
year: 'numeric',
}
),
},
{
icon: Icons.download,
icon: Icons.download as any,
label: 'Download',
value: item.download_count.toString(),
},
{
icon: Icons.globe,
label: 'Geography',
value: item.geographies?.length > 0
? item.geographies.join(', ')
: 'Not specified',
value:
item.geographies?.length > 0
? item.geographies.join(', ')
: 'Not specified',
},
]}
tag={item.tags}
Expand Down
Loading