Skip to content

Commit

Permalink
children type update
Browse files Browse the repository at this point in the history
  • Loading branch information
smelaa committed Feb 23, 2024
1 parent bbcfcb2 commit 737a1fa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,7 @@ SPEC CHECKSUMS:
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Turf: 13d1a92d969ca0311bbc26e8356cca178ce95da2
VisionCamera: 0a6794d1974aed5d653d0d0cb900493e2583e35a
Yoga: e64aa65de36c0832d04e8c7bd614396c77a80047
Yoga: 13c8ef87792450193e117976337b8527b49e8c03

PODFILE CHECKSUM: 0ccbb4f2406893c6e9f266dc1e7470dcd72885d2

Expand Down
4 changes: 2 additions & 2 deletions src/components/VideoPlayerContexts/PlaybackContext.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type {Video} from 'expo-av';
import PropTypes from 'prop-types';
import type {ReactNode} from 'react';
import React, {useCallback, useContext, useEffect, useMemo, useRef, useState} from 'react';
import type {View} from 'react-native';
import useCurrentReportID from '@hooks/useCurrentReportID';
import type ChildrenProps from '@src/types/utils/ChildrenProps';
import type {PlaybackContext} from './types';

const Context = React.createContext<PlaybackContext | null>(null);

function PlaybackContextProvider({children}: {children: ReactNode}) {
function PlaybackContextProvider({children}: ChildrenProps) {
const [currentlyPlayingURL, setCurrentlyPlayingURL] = useState<string | null>(null);
const [sharedElement, setSharedElement] = useState<View | null>(null);
const [originalParent, setOriginalParent] = useState<View | null>(null);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import React, {useCallback, useContext, useMemo, useState} from 'react';
import type {ReactNode} from 'react';
import * as Expensicons from '@components/Icon/Expensicons';
import useLocalize from '@hooks/useLocalize';
import fileDownload from '@libs/fileDownload';
import * as Url from '@libs/Url';
import CONST from '@src/CONST';
import type ChildrenProps from '@src/types/utils/ChildrenProps';
import {usePlaybackContext} from './PlaybackContext';
import type {MenuItem, SingularMenuItem, VideoPopoverMenuContext} from './types';

const Context = React.createContext<VideoPopoverMenuContext | null>(null);

function VideoPopoverMenuContextProvider({children}: {children: ReactNode}) {
function VideoPopoverMenuContextProvider({children}: ChildrenProps) {
const {currentVideoPlayerRef} = usePlaybackContext();
const {translate} = useLocalize();
const [currentPlaybackSpeed, setCurrentPlaybackSpeed] = useState<number>(CONST.VIDEO_PLAYER.PLAYBACK_SPEEDS[2]);
Expand Down
4 changes: 2 additions & 2 deletions src/components/VideoPlayerContexts/VolumeContext.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, {useCallback, useContext, useEffect, useMemo} from 'react';
import type {ReactNode} from 'react';
import {useSharedValue} from 'react-native-reanimated';
import type ChildrenProps from '@src/types/utils/ChildrenProps';
import {usePlaybackContext} from './PlaybackContext';
import type {VolumeContext} from './types';

const Context = React.createContext<VolumeContext | null>(null);

function VolumeContextProvider({children}: {children: ReactNode}) {
function VolumeContextProvider({children}: ChildrenProps) {
const {currentVideoPlayerRef, originalParent} = usePlaybackContext();
const volume = useSharedValue(0);

Expand Down

0 comments on commit 737a1fa

Please sign in to comment.