mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-03-17 03:07:29 +08:00
Update
This commit is contained in:
6
hooks/useScale.ts
Normal file
6
hooks/useScale.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import {Platform, useWindowDimensions} from 'react-native';
|
||||
|
||||
export function useScale(): number {
|
||||
const {width} = useWindowDimensions();
|
||||
return Platform.isTV ? width / 1000 : 1;
|
||||
}
|
||||
Reference in New Issue
Block a user