This commit is contained in:
Yamozha
2021-04-02 02:24:13 +03:00
parent c23950b545
commit 7256d79e2c
31493 changed files with 3036630 additions and 0 deletions

2
node_modules/expo-keep-awake/src/ExpoKeepAwake.ts generated vendored Normal file
View File

@ -0,0 +1,2 @@
import { NativeModulesProxy } from '@unimodules/core';
export default NativeModulesProxy.ExpoKeepAwake;

View File

@ -0,0 +1 @@
export default {};

20
node_modules/expo-keep-awake/src/index.ts generated vendored Normal file
View File

@ -0,0 +1,20 @@
import { useEffect } from 'react';
import ExpoKeepAwake from './ExpoKeepAwake';
const ExpoKeepAwakeTag = 'ExpoKeepAwakeDefaultTag';
export function useKeepAwake(tag: string = ExpoKeepAwakeTag): void {
useEffect(() => {
activateKeepAwake(tag);
return () => deactivateKeepAwake(tag);
}, [tag]);
}
export function activateKeepAwake(tag: string = ExpoKeepAwakeTag): void {
if (ExpoKeepAwake.activate) ExpoKeepAwake.activate(tag);
}
export function deactivateKeepAwake(tag: string = ExpoKeepAwakeTag): void {
if (ExpoKeepAwake.deactivate) ExpoKeepAwake.deactivate(tag);
}