Skip to content
Snippets Groups Projects
Commit dfb573ee authored by Jürgen Voskuhl's avatar Jürgen Voskuhl
Browse files

Another routing fix

parent 79fba4fb
No related branches found
No related tags found
1 merge request!86planning#1203: Standards
Pipeline #56497 failed
......@@ -26,8 +26,8 @@ import useContent from 'shared/use-content'
import useImgPath from 'shared/use-img-path'
import LifecyclePicture from '@/components/fit-standards/LifecyclePicture'
export default function ({ contentsString }) {
const contents: ServiceContent[] = JSON.parse(contentsString)
const router = useRouter()
const contents: ServiceContent[] = JSON.parse(contentsString)
const filters = filterData['filter-it-standards'] /* */
const { filteredServices, activeTagFilters, filterToParams /**/ } = useServiceFilter(contents, router.query.filter)
const { getImgPath } = useImgPath()
......@@ -35,7 +35,9 @@ export default function ({ contentsString }) {
// Für Link auf Detailseite root ermitteln
const currentPath = router.asPath // Aktuellen Pfad holen
const pathSegments = currentPath.split('/') // Pfad in Segmente aufteilen
const rootFolder = '/' + pathSegments[1] // Der Ordnername befindet sich in pathSegments[1]
// Der Ordnername befindet sich in pathSegments[1]
const rootFolder = '/' + pathSegments[1] + ( pathSegments[2] != '' ? '/' + pathSegments[2] : '')
console.log(pathSegments)
......
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