File tree Expand file tree Collapse file tree
src/components/FloatingCameraButton Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import React , { useState } from 'react' ;
1+ import React , { useEffect , useState } from 'react' ;
22import { View } from 'react-native' ;
33import type { OnyxCollection } from 'react-native-onyx' ;
44import Icon from '@components/Icon' ;
5+ import { loadExpensifyIconsChunk } from '@components/Icon/ExpensifyIconLoader' ;
6+ import { loadIllustrationsChunk } from '@components/Icon/IllustrationLoader' ;
57import { PressableWithoutFeedback } from '@components/Pressable' ;
68import useLocalize from '@hooks/useLocalize' ;
79import useOnyx from '@hooks/useOnyx' ;
@@ -33,6 +35,11 @@ function BaseFloatingCameraButton({icon}: BaseFloatingCameraButtonProps) {
3335 const styles = useThemeStyles ( ) ;
3436 const { translate} = useLocalize ( ) ;
3537
38+ useEffect ( ( ) => {
39+ loadIllustrationsChunk ( ) ;
40+ loadExpensifyIconsChunk ( ) ;
41+ } , [ ] ) ;
42+
3643 const [ activePolicyID ] = useOnyx ( ONYXKEYS . NVP_ACTIVE_POLICY_ID ) ;
3744 const [ activePolicy ] = useOnyx ( `${ ONYXKEYS . COLLECTION . POLICY } ${ activePolicyID } ` ) ;
3845 const [ session ] = useOnyx ( ONYXKEYS . SESSION , { selector : sessionEmailAndAccountIDSelector } ) ;
You can’t perform that action at this time.
0 commit comments