Skip to content

Commit

Permalink
Add search page no results text
Browse files Browse the repository at this point in the history
  • Loading branch information
smrtrfszm committed Dec 27, 2023
1 parent 8d99181 commit a0be969
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pages/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ const SearchPage: Component<RouteSectionProps> = ({ location }) => {
<Show when={!!location.query.term}>
<h1 class={styles.title}>Találatok erre a kifejezésre: "{location.query.term}"</h1>
</Show>
<CardGrid posts={data()} />
<Show when={data()}>
<Show when={data()!.length > 0}>
<CardGrid posts={data()} />
</Show>
<Show when={data()!.length === 0}>
<p>Nincs találat!</p>
</Show>
</Show>
</div>
</>
)
Expand Down

0 comments on commit a0be969

Please sign in to comment.