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

Use name & title for documents & list in sidebar

parent d20e40ee
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ const LinkList = (props: ILinkList) => {
to={item.url}
target="_blank"
className={twMerge(
"overflow-hidden text-ellipsis",
"overflow-hidden text-ellipsis whitespace-nowrap",
oClass.item
)}
{...options}
......
......@@ -18,7 +18,9 @@ const SideBar = (props: ISideBar) => {
const documentsData = documents.map((item) => {
return {
url: item?.directus_files_id?.imageFile.publicURL,
name: item?.directus_files_id?.filename_download,
name:
item?.directus_files_id?.title ||
item?.directus_files_id?.filename_download,
}
})
......
......@@ -170,12 +170,14 @@ export const query = graphql`
links {
id
links_id {
name
url
}
}
documents {
directus_files_id {
id
title
filename_download
imageFile {
publicURL
......
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