decord/source/modules/application_commands/ApplicationCommandFrecencyHooks.tsx

39 lines
2 KiB
TypeScript
Raw Normal View History

// Module ID: 9304
// Function ID: 9305
2026-07-20 16:05:17 +00:00
// Name: useTopCommands
// Dependencies: [19, 9297, 1084, 1940, 504, 2]
2026-07-20 16:05:17 +00:00
// Exports: useTopCommands, useTopRealCommands
// Module 9304 (useTopCommands)
2026-08-24 06:08:38 +00:00
import closure_2 from "noop" /* 19 */;
import handleUserSettingsProtoStoreChange from "handleUserSettingsProtoStoreChange" /* 9297 */;
import closure_5 from "handleUserSettingsProtoStoreChange" /* 9297 */;
import { UserSettingsTypes } from "MAX_FAVORITES" /* 1084 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ getFilteredTopCommands: c3, getTopRealCommands: c4 } = handleUserSettingsProtoStoreChange);
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/application_commands/ApplicationCommandFrecencyHooks.tsx");
2026-07-20 16:05:17 +00:00
export const useTopCommands = function useTopCommands(commandContext) {
2026-07-23 10:11:24 +00:00
const _require = commandContext;
2026-07-20 16:05:17 +00:00
const effect = React.useEffect(() => {
2026-07-23 10:11:24 +00:00
const FrecencyUserSettingsActionCreators = commandContext(stateFromStores[3]).FrecencyUserSettingsActionCreators;
2026-07-29 08:29:29 +00:00
const ifUncached = FrecencyUserSettingsActionCreators.loadIfUncached(constants.FRECENCY_AND_FAVORITES_SETTINGS);
2026-07-20 16:05:17 +00:00
}, []);
const items = [closure_5];
2026-07-29 08:29:29 +00:00
stateFromStores = _require(stateFromStores[4]).useStateFromStores(items, () => topCommandsWithoutLoadingLatest.getTopCommandsWithoutLoadingLatest());
2026-07-20 16:05:17 +00:00
const items1 = [stateFromStores, commandContext];
2026-08-24 06:08:38 +00:00
return React.useMemo(() => closure_1_3(stateFromStores, closure_0), items1);
2026-07-20 16:05:17 +00:00
};
export const useTopRealCommands = function useTopRealCommands(arg0) {
2026-07-23 10:11:24 +00:00
const _require = arg0;
2026-07-20 16:05:17 +00:00
const effect = React.useEffect(() => {
2026-07-23 10:11:24 +00:00
const FrecencyUserSettingsActionCreators = callback(stateFromStores[3]).FrecencyUserSettingsActionCreators;
2026-07-20 16:05:17 +00:00
const ifNecessary = FrecencyUserSettingsActionCreators.loadIfNecessary();
}, []);
const items = [closure_5];
2026-07-29 08:29:29 +00:00
stateFromStores = _require(stateFromStores[4]).useStateFromStores(items, () => topCommandsWithoutLoadingLatest.getTopCommandsWithoutLoadingLatest());
2026-07-20 16:05:17 +00:00
const items1 = [stateFromStores, arg0];
2026-08-24 06:08:38 +00:00
return React.useMemo(() => closure_1_4(closure_1_3(stateFromStores, closure_0)), items1);
2026-07-20 16:05:17 +00:00
};