Skip to content
Snippets Groups Projects
Commit 3c030205 authored by Julien MARGAIL's avatar Julien MARGAIL
Browse files

Merge branch 'feat/news' into 'main'

add date and badge

See merge request onegeo-suite/libs/gatsby-theme-onegeo!5
parents 51bc7a35 650eefcb
No related branches found
No related tags found
No related merge requests found
import React, { ReactElement, useState } from "react"
import { graphql, PageProps } from "gatsby"
import { IGatsbyImageData } from "gatsby-plugin-image"
import dayjs from "dayjs"
import { Layout, Content, CardList } from "@onegeo-suite/gatsby-theme-onegeo"
......@@ -38,6 +39,8 @@ function News({ data }: PageProps<DataProps>): ReactElement {
description: dt.abstract || dt.content,
image: dt.image?.imageFile,
url: "/news/" + dt.slug,
category: dt.categories,
date: dayjs(dt.date_published).format("DD/MM/YYYY"),
}
})
......@@ -95,6 +98,11 @@ export const query = graphql`
publicURL
}
}
categories {
id
name
label
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment