import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { searchForMedia } from "@/backend/metadata/search"; import { MWMediaMeta, MWQuery } from "@/backend/metadata/types/mw"; import { IconPatch } from "@/components/buttons/IconPatch"; import { Icons } from "@/components/Icon"; import { SectionHeading } from "@/components/layout/SectionHeading"; import { MediaGrid } from "@/components/media/MediaGrid"; import { WatchedMediaCard } from "@/components/media/WatchedMediaCard"; import { useLoading } from "@/hooks/useLoading"; import { SearchLoadingPart } from "@/views/parts/search/SearchLoadingPart"; function SearchSuffix(props: { failed?: boolean; results?: number }) { const { t } = useTranslation(); const icon: Icons = props.failed ? Icons.WARNING : Icons.EYE_SLASH; return (
{t("search.allResults")}
) : ({t("search.noResults")}
)}{t("search.allFailed")}