-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30439 from VickyStash/ts-migration/splashScreenHi…
…der-component [TS migration] Migrate 'SplashScreenHider' component to TypeScript
- Loading branch information
Showing
4 changed files
with
26 additions
and
46 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import {useEffect} from 'react'; | ||
import BootSplash from '@libs/BootSplash'; | ||
import type SplashScreenHiderProps from './types'; | ||
|
||
function SplashScreenHider({onHide = () => {}}: SplashScreenHiderProps) { | ||
useEffect(() => { | ||
BootSplash.hide().then(() => onHide()); | ||
}, [onHide]); | ||
|
||
return null; | ||
} | ||
|
||
SplashScreenHider.displayName = 'SplashScreenHider'; | ||
|
||
export default SplashScreenHider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type SplashScreenHiderProps = { | ||
/** Splash screen has been hidden */ | ||
onHide: () => void; | ||
}; | ||
|
||
export default SplashScreenHiderProps; |