Skip to content

Commit

Permalink
impact from ref to config.extras
Browse files Browse the repository at this point in the history
  • Loading branch information
abulte committed Aug 12, 2024
1 parent e76b730 commit e215e8b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/utils/bouquet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ export function useBreadcrumbLinksForTopic(
theme: Ref<string | undefined>,
subtheme: Ref<string | undefined>,
topic: Ref<Topic | null>,
pageAllTopics: Ref<Boolean | null>
pageAllTopics: Ref<boolean | null>
): ComputedRef<BreadcrumbItem[]> {
return computed(() => {
const breadcrumbs = [{ to: '/', text: 'Accueil' }]
if (pageAllTopics) {
if (pageAllTopics.value === true) {
breadcrumbs.push({ to: `/${topicSlug}`, text: `${topicName}s` })
}

Expand All @@ -103,7 +103,7 @@ export function useBreadcrumbLinksForTopic(

export function useExtras(
topic: Ref<Topic | null>,
extrasProperty: Ref<string>
extrasProperty: string
): {
theme: Ref<string | undefined>
subtheme: Ref<string | undefined>
Expand All @@ -116,10 +116,10 @@ export function useExtras(
const clonedFrom = ref<Topic | null>(null)

watch(
[topic, extrasProperty],
[topic],
() => {
const extras = topic.value?.extras[extrasProperty.value]
if (extras) {
const extras = topic.value?.extras[extrasProperty]
if (extras != null) {
theme.value = extras.theme
subtheme.value = extras.subtheme
datasetsProperties.value = extras.datasets_properties ?? []
Expand Down

0 comments on commit e215e8b

Please sign in to comment.