fix: hidden theme link not working

This commit is contained in:
Robin van der Linde 2023-03-09 20:54:12 +01:00
parent e185606e73
commit d5e128b1ed
Signed by untrusted user who does not match committer: Robin-van-der-Linde
GPG key ID: 53956B3252478F0D
2 changed files with 6 additions and 7 deletions

View file

@ -27,7 +27,7 @@
$: knownThemes = hiddenThemes.filter((theme) => knownThemesId.includes(theme.id))
</script>
<ThemesList {search} {state} {onMainScreen} themes={knownThemes} isCustom={true} hideThemes={false}>
<ThemesList {search} {state} {onMainScreen} themes={knownThemes} isCustom={false} hideThemes={false}>
<svelte:fragment slot="title">
<h3>{t.previouslyHiddenTitle.toString()}</h3>
<p>

View file

@ -8,7 +8,7 @@
import CustomGeneratorButton from "./CustomGeneratorButton.svelte"
import ProfessionalServicesButton from "./ProfessionalServicesButton.svelte"
import ThemeButton from "./ThemeButton.svelte"
import { LayoutInformation } from "../../Models/ThemeConfig/LayoutConfig";
import { LayoutInformation } from "../../Models/ThemeConfig/LayoutConfig"
export let search: UIEventSource<string>
export let themes: LayoutInformation[]
@ -44,7 +44,7 @@
<slot name="title" />
{#if onMainScreen}
<div class="md:grid md:grid-flow-row md:grid-cols-2 lg:grid-cols-3 gap-4">
{#if ($search === undefined || $search === "") && !isCustom}
{#if ($search === undefined || $search === "") && !isCustom && hideThemes}
<CustomGeneratorButton userDetails={state.osmConnection.userDetails} />
<ProfessionalServicesButton />
{/if}
@ -55,9 +55,9 @@
{/if}
{/each}
</div>
{:else }
{:else}
<div>
{#if ($search === undefined || $search === "") && !isCustom}
{#if ($search === undefined || $search === "") && !isCustom && hideThemes}
<CustomGeneratorButton userDetails={state.osmConnection.userDetails} />
<ProfessionalServicesButton />
{/if}
@ -68,8 +68,7 @@
{/if}
{/each}
</div>
{/if}
{/if}
{#if filteredThemes.length == 0}
<NoThemeResultButton {search} />