Skip to content
Snippets Groups Projects
Commit 427f0dee authored by Manoa Harinjo's avatar Manoa Harinjo
Browse files

run upload file and run link

parent d24f8bc3
No related branches found
No related tags found
No related merge requests found
......@@ -163,8 +163,6 @@ const Menu = (props: Imenu) => {
} else {
url = item?.url
}
console.log("at", item?.options?.link)
return (
<li key={"M_" + name + "_L0_" + key}>
<Link
......
......@@ -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: {
......@@ -108,7 +128,7 @@ const News = ({ pageContext, data, location }: PageProps<Idata>) => {
return (
<Layout>
<Content className="mx-64 pt-8 max-w-none">
<Content className="mx-64 max-w-none pt-8">
<div className="bg-base-100 rounded-xl p-6 shadow-lg">
<Button
aria-label="Retour"
......@@ -220,7 +240,11 @@ export const query = graphql`
}
documents {
directus_files_id {
id
filename_download
imageFile {
publicURL
}
}
}
categories {
......@@ -229,4 +253,4 @@ export const query = graphql`
}
}
}
`
\ No newline at end of file
`
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