1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-02-20 20:51:49 +01:00
upscayl/renderer/components/hooks/use-custom-models.ts
2024-09-24 20:21:20 +05:30

18 lines
498 B
TypeScript

import ELECTRON_COMMANDS from "@common/commands";
import { useEffect } from "react";
import useLog from "./useLog";
export const initCustomModels = () => {
const { logit } = useLog();
useEffect(() => {
const customModelsPath = JSON.parse(
localStorage.getItem("customModelsPath"),
);
if (customModelsPath !== null) {
window.electron.send(ELECTRON_COMMANDS.GET_MODELS_LIST, customModelsPath);
logit("🎯 GET_MODELS_LIST: ", customModelsPath);
}
}, []);
};