mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 23:59:08 +00:00
chore: Apply linting rules and add git hok (#611)
Co-authored-by: Fredrik Burmester <fredrik.burmester@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import orientationToOrientationLock from "@/utils/OrientationLockConverter";
|
||||
import * as ScreenOrientation from "@/packages/expo-screen-orientation";
|
||||
import orientationToOrientationLock from "@/utils/OrientationLockConverter";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Platform } from "react-native";
|
||||
|
||||
@@ -7,7 +7,7 @@ export const useOrientation = () => {
|
||||
const [orientation, setOrientation] = useState(
|
||||
Platform.isTV
|
||||
? ScreenOrientation.OrientationLock.LANDSCAPE
|
||||
: ScreenOrientation.OrientationLock.UNKNOWN
|
||||
: ScreenOrientation.OrientationLock.UNKNOWN,
|
||||
);
|
||||
|
||||
if (Platform.isTV) return { orientation, setOrientation };
|
||||
@@ -16,7 +16,7 @@ export const useOrientation = () => {
|
||||
const orientationSubscription =
|
||||
ScreenOrientation.addOrientationChangeListener((event) => {
|
||||
setOrientation(
|
||||
orientationToOrientationLock(event.orientationInfo.orientation)
|
||||
orientationToOrientationLock(event.orientationInfo.orientation),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user