Only show face library for desktop

This commit is contained in:
Nicolas Mowen 2024-11-25 09:38:43 -07:00
parent 075ce1dcf9
commit c3b8110a42

View File

@ -2,6 +2,7 @@ import { ENV } from "@/env";
import { FrigateConfig } from "@/types/frigateConfig"; import { FrigateConfig } from "@/types/frigateConfig";
import { NavData } from "@/types/navigation"; import { NavData } from "@/types/navigation";
import { useMemo } from "react"; import { useMemo } from "react";
import { isDesktop } from "react-device-detect";
import { FaCompactDisc, FaVideo } from "react-icons/fa"; import { FaCompactDisc, FaVideo } from "react-icons/fa";
import { IoSearch } from "react-icons/io5"; import { IoSearch } from "react-icons/io5";
import { LuConstruction } from "react-icons/lu"; import { LuConstruction } from "react-icons/lu";
@ -68,7 +69,7 @@ export default function useNavigation(
icon: TbFaceId, icon: TbFaceId,
title: "Face Library", title: "Face Library",
url: "/faces", url: "/faces",
enabled: config?.face_recognition.enabled, enabled: isDesktop && config?.face_recognition.enabled,
}, },
] as NavData[], ] as NavData[],
[config?.face_recognition.enabled, variant], [config?.face_recognition.enabled, variant],