Fixes tags not showing on front page
This commit is contained in:
@@ -660,6 +660,13 @@ func registerRoutes(se *core.ServeEvent, client meilisearch.ServiceManager) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, t := range trails {
|
||||
errs := e.App.ExpandRecord(t, []string{"tags"}, nil)
|
||||
if len(errs) > 0 {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(trails) < size {
|
||||
size = len(trails)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
|
||||
import emptyStateTrailDark from "$lib/assets/svgs/empty_states/empty_state_trail_dark.svg";
|
||||
import emptyStateTrailLight from "$lib/assets/svgs/empty_states/empty_state_trail_light.svg";
|
||||
import type { Trail } from "$lib/models/trail";
|
||||
@@ -122,7 +121,13 @@
|
||||
{trail.expand.author.username}
|
||||
</p>
|
||||
{/if}
|
||||
{#if trail.tags?.length}
|
||||
{#if trail.expand?.tags?.length}
|
||||
<div class="flex flex-wrap gap-1 mb-3">
|
||||
{#each trail.expand?.tags ?? [] as t}
|
||||
<Chip text={t.name} closable={false} primary={false}></Chip>
|
||||
{/each}
|
||||
</div>
|
||||
{:else if trail.tags?.length}
|
||||
<div class="flex flex-wrap gap-1 mb-3">
|
||||
{#each trail.tags ?? [] as t}
|
||||
<Chip text={t} closable={false} primary={false}></Chip>
|
||||
|
||||
Reference in New Issue
Block a user