Skip to content

Commit

Permalink
feat: st if condition inside custom-my-history
Browse files Browse the repository at this point in the history
  • Loading branch information
annacv committed Oct 26, 2023
1 parent e401ad2 commit 81c1cd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/components/my-history/custom-my-history.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@

<div class="x-flex x-flex-col x-gap-2">
<p>{{ suggestion.query }}</p>
<MyHistoryFilters :suggestion="suggestion" />
<MyHistoryFilters
v-if="suggestion.selectedFilters.length > 0"
:suggestion="suggestion"
/>

<p class="x-text1 x-text1-sm x-text-neutral-75">
{{ formatTime(suggestion.timestamp) }}
Expand Down
2 changes: 1 addition & 1 deletion src/components/my-history/my-history-filters.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<template v-if="suggestion.selectedFilters.length > 0">
<template>
<p class="x-text1-sm x-text-lead-50 x-line-clamp-1">
<span
v-for="filter in suggestion.selectedFilters"
Expand Down

0 comments on commit 81c1cd4

Please sign in to comment.