mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-11 09:37:37 +03:00
Cleanup hiding logic
This commit is contained in:
parent
c5a1e186bd
commit
00e16391ae
@ -299,7 +299,7 @@ function AllExportsView({
|
|||||||
|
|
||||||
const filteredCases = useMemo(() => {
|
const filteredCases = useMemo(() => {
|
||||||
if (!search || !cases) {
|
if (!search || !cases) {
|
||||||
return cases;
|
return cases || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return cases.filter(
|
return cases.filter(
|
||||||
@ -327,14 +327,14 @@ function AllExportsView({
|
|||||||
<div className="w-full overflow-hidden">
|
<div className="w-full overflow-hidden">
|
||||||
{filteredCases?.length || filteredExports.length ? (
|
{filteredCases?.length || filteredExports.length ? (
|
||||||
<div className="flex flex-col gap-4">
|
<div className="flex flex-col gap-4">
|
||||||
{filteredCases?.length && (
|
{filteredCases.length > 0 && (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Heading as="h4">{t("headings.cases")}</Heading>
|
<Heading as="h4">{t("headings.cases")}</Heading>
|
||||||
<div
|
<div
|
||||||
ref={contentRef}
|
ref={contentRef}
|
||||||
className="scrollbar-container grid size-full gap-2 overflow-y-auto sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"
|
className="scrollbar-container grid size-full gap-2 overflow-y-auto sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"
|
||||||
>
|
>
|
||||||
{cases.map((item) => (
|
{cases?.map((item) => (
|
||||||
<CaseCard
|
<CaseCard
|
||||||
key={item.name}
|
key={item.name}
|
||||||
className={
|
className={
|
||||||
@ -352,7 +352,7 @@ function AllExportsView({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{filteredExports.length && (
|
{filteredExports.length > 0 && (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<Heading as="h4">{t("headings.uncategorizedExports")}</Heading>
|
<Heading as="h4">{t("headings.uncategorizedExports")}</Heading>
|
||||||
<div
|
<div
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user