feat: better cache some stuff
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { Signal, useSignal } from "@preact/signals";
|
||||
import { useRef } from "preact/hooks";
|
||||
import { useEffect, useRef } from "preact/hooks";
|
||||
import { useEventListener } from "@lib/hooks/useEventListener.ts";
|
||||
import { menus } from "@islands/KMenu/commands.ts";
|
||||
import { MenuEntry } from "@islands/KMenu/types.ts";
|
||||
|
@ -39,7 +39,7 @@ export const addMovieInfos: MenuEntry = {
|
||||
};
|
||||
|
||||
state.activeMenu.value = menuID;
|
||||
|
||||
state.commandInput.value = "";
|
||||
state.activeState.value = "normal";
|
||||
},
|
||||
visible: () => {
|
||||
|
@ -20,8 +20,6 @@ export const addSeriesInfo: MenuEntry = {
|
||||
|
||||
const json = await response.json() as TMDBSeries[];
|
||||
|
||||
console.log("Result", json);
|
||||
|
||||
const menuID = `result/${series.name}`;
|
||||
|
||||
state.menus[menuID] = {
|
||||
@ -42,12 +40,8 @@ export const addSeriesInfo: MenuEntry = {
|
||||
})),
|
||||
};
|
||||
|
||||
await new Promise((res) => setTimeout(res, 20));
|
||||
|
||||
state.commandInput.value = "";
|
||||
state.activeMenu.value = menuID;
|
||||
|
||||
await new Promise((res) => setTimeout(res, 20));
|
||||
|
||||
state.activeState.value = "normal";
|
||||
},
|
||||
visible: () => {
|
||||
|
Reference in New Issue
Block a user