Skip to content
Snippets Groups Projects
Commit 82a26fb5 authored by Manoa Harinjo's avatar Manoa Harinjo Committed by Julien MARGAIL
Browse files

Fix/upload link

parent 70f50888
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ import {
Button,
Layout,
Content,
Link,
} from "@onegeo-suite/gatsby-theme-onegeo"
const SideBar = ({ documents, links }) => {
......@@ -23,13 +24,18 @@ const SideBar = ({ documents, links }) => {
</p>
<div className="mt-2 ">
{documents.map((item: any, key: number) => {
const file =
item.directus_files_id.imageFile.publicURL
return (
<ul className="leading-8" key={key}>
<li>
{
item.directus_files_id
.filename_download
}
<a href={file} target="_blank" download>
{
item.directus_files_id
.filename_download
}
</a>
</li>
</ul>
)
......@@ -47,7 +53,17 @@ const SideBar = ({ documents, links }) => {
{links.map((item: any) => {
return (
<ul className="leading-8" key={item.id}>
<li>{item.links_id.url}</li>
<li>
<Link
to={item.links_id.url}
target="_blank"
>
<div className="overflow-hidden text-ellipsis">
{" "}
{item.links_id.url}{" "}
</div>
</Link>
</li>
</ul>
)
})}
......@@ -79,7 +95,11 @@ interface Idata {
}
documents: {
directus_files_id: {
filename_download: string
filename_disk: string
imageFile: {
publicURL: string
}
id: number
}
}
categories: {
......@@ -219,7 +239,11 @@ export const query = graphql`
}
documents {
directus_files_id {
id
filename_download
imageFile {
publicURL
}
}
}
categories {
......
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