Skip to content

Commit

Permalink
fixed use cases blueprints (#1861)
Browse files Browse the repository at this point in the history
Co-authored-by: Taron Chatoyan <[email protected]>
  • Loading branch information
t-chatoyan and Taron Chatoyan authored Oct 14, 2024
1 parent 8e29d83 commit 5de0ed7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions components/use-cases/engineers/ExploreBlueprints.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@
const config = useRuntimeConfig();
const blueprints = ref([])
const props = defineProps({
query: {
tag: {
type: String,
required: true
},
required: false
}
})
const { data: blueprintsData } = await useAsyncData('blueprints', () => {
return $fetch(`${config.public.apiUrl}/blueprints?type=${props.query}`)
return $fetch(`${config.public.apiUrl}/blueprints?tags=${props.tag}`)
});
const {data: tags} = await useAsyncData('blueprints-tags', () => {
return $fetch(`${config.public.apiUrl}/blueprints/tags`)
})
const generateCardHref =async (blueprint) => {
let tag = await tags.value.find(f => f?.id == blueprint.tags[0]);
if (!tag || !tag.name) {
return `/blueprints/unknown/${blueprint.id}-${slugify(blueprint.title)}`;
return `/blueprints/unknown/${blueprint.id}-${slugify(blueprint.title)}`;
}
return `/blueprints/${tag.name?.replace(' ', '-')}/${blueprint.id}-${slugify(blueprint.title)}`
}
Expand Down
2 changes: 1 addition & 1 deletion pages/use-cases/data-engineers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/>
</NuxtLazyHydrate>
<NuxtLazyHydrate when-visible>
<UseCasesEngineersExploreBlueprints />
<UseCasesEngineersExploreBlueprints tag="55" />
</NuxtLazyHydrate>
<NuxtLazyHydrate when-visible>
<UseCasesEngineersDataOrchestration
Expand Down
2 changes: 1 addition & 1 deletion pages/use-cases/platform-engineers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/>
</NuxtLazyHydrate>
<NuxtLazyHydrate when-visible>
<UseCasesEngineersExploreBlueprints />
<UseCasesEngineersExploreBlueprints tag="57" />
</NuxtLazyHydrate>
<NuxtLazyHydrate when-visible>
<UseCasesEngineersDataOrchestration
Expand Down
2 changes: 1 addition & 1 deletion pages/use-cases/software-engineers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/>
</NuxtLazyHydrate>
<NuxtLazyHydrate when-visible>
<UseCasesEngineersExploreBlueprints />
<UseCasesEngineersExploreBlueprints tag="56"/>
</NuxtLazyHydrate>
<NuxtLazyHydrate when-visible>
<UseCasesEngineersDataOrchestration
Expand Down

0 comments on commit 5de0ed7

Please sign in to comment.