File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
views/AccessibilityAndAppearanceView/components Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -42,15 +42,12 @@ const Toast = (): React.ReactElement => {
4242 } ;
4343
4444 const showToast = ( { message } : { message : string } ) => {
45+ if ( alertDisplayType === 'DIALOG' ) {
46+ Alert . alert ( message ) ;
47+ return ;
48+ }
4549 if ( toast && toast . show ) {
46- switch ( alertDisplayType ) {
47- case 'DIALOG' :
48- Alert . alert ( message ) ;
49- break ;
50- case 'TOAST' :
51- toast . show ( message , 1000 ) ;
52- break ;
53- }
50+ toast . show ( message , 1000 ) ;
5451 }
5552 } ;
5653
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const OPTIONS: TOPTIONS = [
5151] ;
5252
5353interface IBaseParams {
54- value : string ;
54+ value : TAlertDisplayType ;
5555 onChangeValue : ( value : TAlertDisplayType ) => void ;
5656}
5757
@@ -64,7 +64,7 @@ const ListPicker = ({
6464} & IBaseParams ) => {
6565 const { showActionSheet, hideActionSheet } = useActionSheet ( ) ;
6666 const { colors } = useTheme ( ) ;
67- const option = OPTIONS . find ( option => option . value === value ) || OPTIONS [ 2 ] ;
67+ const option = OPTIONS . find ( option => option . value === value ) || OPTIONS [ 0 ] ;
6868
6969 const getOptions = ( ) : TActionSheetOptionsItem [ ] =>
7070 OPTIONS . map ( i => ( {
You can’t perform that action at this time.
0 commit comments