From 737a1fa7d062381e40bd53a08836bae26ae9a509 Mon Sep 17 00:00:00 2001 From: smelaa Date: Fri, 23 Feb 2024 13:27:13 +0100 Subject: [PATCH] children type update --- ios/Podfile.lock | 2 +- src/components/VideoPlayerContexts/PlaybackContext.tsx | 4 ++-- .../VideoPlayerContexts/VideoPopoverMenuContext.tsx | 4 ++-- src/components/VideoPlayerContexts/VolumeContext.tsx | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 52c817c739b3..24a8d07b7d34 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1999,7 +1999,7 @@ SPEC CHECKSUMS: SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Turf: 13d1a92d969ca0311bbc26e8356cca178ce95da2 VisionCamera: 0a6794d1974aed5d653d0d0cb900493e2583e35a - Yoga: e64aa65de36c0832d04e8c7bd614396c77a80047 + Yoga: 13c8ef87792450193e117976337b8527b49e8c03 PODFILE CHECKSUM: 0ccbb4f2406893c6e9f266dc1e7470dcd72885d2 diff --git a/src/components/VideoPlayerContexts/PlaybackContext.tsx b/src/components/VideoPlayerContexts/PlaybackContext.tsx index 92454266f1b1..c84651dc2e6c 100644 --- a/src/components/VideoPlayerContexts/PlaybackContext.tsx +++ b/src/components/VideoPlayerContexts/PlaybackContext.tsx @@ -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(null); -function PlaybackContextProvider({children}: {children: ReactNode}) { +function PlaybackContextProvider({children}: ChildrenProps) { const [currentlyPlayingURL, setCurrentlyPlayingURL] = useState(null); const [sharedElement, setSharedElement] = useState(null); const [originalParent, setOriginalParent] = useState(null); diff --git a/src/components/VideoPlayerContexts/VideoPopoverMenuContext.tsx b/src/components/VideoPlayerContexts/VideoPopoverMenuContext.tsx index 0b9eca322ced..52fb768d7af1 100644 --- a/src/components/VideoPlayerContexts/VideoPopoverMenuContext.tsx +++ b/src/components/VideoPlayerContexts/VideoPopoverMenuContext.tsx @@ -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(null); -function VideoPopoverMenuContextProvider({children}: {children: ReactNode}) { +function VideoPopoverMenuContextProvider({children}: ChildrenProps) { const {currentVideoPlayerRef} = usePlaybackContext(); const {translate} = useLocalize(); const [currentPlaybackSpeed, setCurrentPlaybackSpeed] = useState(CONST.VIDEO_PLAYER.PLAYBACK_SPEEDS[2]); diff --git a/src/components/VideoPlayerContexts/VolumeContext.tsx b/src/components/VideoPlayerContexts/VolumeContext.tsx index a43f6476da3e..8637fc2ae407 100644 --- a/src/components/VideoPlayerContexts/VolumeContext.tsx +++ b/src/components/VideoPlayerContexts/VolumeContext.tsx @@ -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(null); -function VolumeContextProvider({children}: {children: ReactNode}) { +function VolumeContextProvider({children}: ChildrenProps) { const {currentVideoPlayerRef, originalParent} = usePlaybackContext(); const volume = useSharedValue(0);