mirror of
https://github.com/zadam/trilium.git
synced 2026-05-07 16:35:36 +02:00
fix(search): "no results" item not shown
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import "./search_result.css";
|
||||
|
||||
import clsx from "clsx";
|
||||
import { useEffect, useState } from "preact/hooks";
|
||||
|
||||
import { t } from "../services/i18n";
|
||||
import { SearchNoteList } from "./collections/NoteList";
|
||||
import Alert from "./react/Alert";
|
||||
import { useNoteContext, useTriliumEvent } from "./react/hooks";
|
||||
import "./search_result.css";
|
||||
import { SearchNoteList } from "./collections/NoteList";
|
||||
|
||||
enum SearchResultState {
|
||||
NO_RESULTS,
|
||||
@@ -42,7 +45,7 @@ export default function SearchResult() {
|
||||
});
|
||||
|
||||
return (
|
||||
<div className={`search-result-widget ${!state ? "hidden-ext" : ""}`}>
|
||||
<div className={clsx("search-result-widget", state === undefined && "hidden-ext")}>
|
||||
{state === SearchResultState.NOT_EXECUTED && (
|
||||
<Alert type="info" className="search-not-executed-yet">{t("search_result.search_not_executed")}</Alert>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user