Skip to content
Snippets Groups Projects
Commit 52d4672b authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Fix some url issue

parent 67b25417
No related branches found
No related tags found
No related merge requests found
Pipeline #133807 waiting for manual action with stages
in 8 minutes
......@@ -161,16 +161,17 @@ function pdbNameToCif(pdbPath: string) {
function buildStructureUrl(item: StructureItem) {
return [`/${item.system.toLocaleLowerCase()}/${pdbNameToCif(item.pdb)}`, `/${item.system}/${item.pdb}`]
const lowercaseSystem = item.system.toLocaleLowerCase()
return [
`/${lowercaseSystem}/${pdbNameToCif(item.pdb)}`,
`/${lowercaseSystem}/${item.pdb}`].map(url => {
return toValue(useRefinedUrl(url).refinedUrl)
})
}
function displayStructure(item: StructureItem) {
const structureUrls = buildStructureUrl(item)
console.log(structureUrls)
structureBasket.set(structureUrls.map(url => {
const refinedUrl = useRefinedUrl(url).refinedUrl
return toValue(refinedUrl)
}))
structureBasket.set(structureUrls)
structureTitle.value = `${item?.system} - ${item.subsystem}`
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment