decord/beta/source/modules/gateway/useRequestGatewaySocket.tsx

34 lines
1.1 KiB
TypeScript
Raw Normal View History

// Module ID: 14121
// Function ID: 14122
// Name: useRequestGatewaySocket
// Dependencies: [19, 10704, 7176, 2]
// Exports: useRequestGatewaySocket
// Module 14121 (useRequestGatewaySocket)
import RequestGatewaySocketAll from "RequestGatewaySocket" /* 7176 */;
import DiscordAppStateDefault from "DiscordAppState" /* 10704 */;
2026-10-01 14:13:23 +00:00
import react from "react" /* 19 */;
import size from "module_2" /* 2 */;
let importDefault;
const result = size.fileFinishedImporting("modules/gateway/useRequestGatewaySocket.tsx");
export const useRequestGatewaySocket = function useRequestGatewaySocket(arg0) {
2026-10-01 14:13:23 +00:00
let closure_0;
importDefault = arg0;
2026-10-01 14:13:23 +00:00
let obj = DiscordAppStateDefault;
const canUIRequestGatewaySocket = obj.useCanUIRequestGatewaySocket();
const items = [arg0, canUIRequestGatewaySocket];
2026-10-01 14:13:23 +00:00
const effect = react.useEffect(() => {
if (canUIRequestGatewaySocket) {
2026-10-01 14:13:23 +00:00
let obj = RequestGatewaySocketAll;
obj.setRequestedBy(closure_0);
return () => {
2026-10-01 14:13:23 +00:00
const obj = canUIRequestGatewaySocket(dependencyMap[2]);
obj.stopRequest(closure_1_0);
};
}
}, items);
};