forked from MapComplete/MapComplete
Fix: regression in themeslist
This commit is contained in:
parent
01f1fbf89a
commit
347a02778f
1 changed files with 1 additions and 11 deletions
|
@ -14,16 +14,6 @@
|
|||
export let state: { osmConnection: OsmConnection }
|
||||
export let onlyIcons: boolean = false
|
||||
export let hasSelection: boolean = true
|
||||
let themesFiltered: MinimalThemeInformation[] = []
|
||||
for (const theme of themes) {
|
||||
if (!theme) {
|
||||
continue
|
||||
}
|
||||
if (themesFiltered.some(th => th.id === theme.id)) {
|
||||
continue
|
||||
}
|
||||
themesFiltered.push(theme)
|
||||
}
|
||||
</script>
|
||||
|
||||
<section class="w-full">
|
||||
|
@ -33,7 +23,7 @@
|
|||
? "flex flex-wrap items-center justify-center gap-x-2"
|
||||
: "theme-list my-2 gap-4 md:grid md:grid-flow-row md:grid-cols-2 lg:grid-cols-3"}
|
||||
>
|
||||
{#each Utils.NoNull(themesFiltered) as theme (theme.id)}
|
||||
{#each Utils.DedupOnId(Utils.NoNull(themes)) as theme (theme.id)}
|
||||
<ThemeButton {theme} {state} iconOnly={onlyIcons}>
|
||||
{#if $search && hasSelection && themes?.[0] === theme}
|
||||
<span class="thanks hidden-on-mobile" aria-hidden="true">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue