mirror of
https://github.com/upscayl/upscayl.git
synced 2025-01-07 04:01:34 +01:00
18 lines
517 B
TypeScript
18 lines
517 B
TypeScript
|
import { ELECTRON_COMMANDS } from "@common/electron-commands";
|
||
|
import { useEffect } from "react";
|
||
|
import useLogger from "./use-logger";
|
||
|
|
||
|
export const initCustomModels = () => {
|
||
|
const logit = useLogger();
|
||
|
|
||
|
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);
|
||
|
}
|
||
|
}, []);
|
||
|
};
|