This file contains hidden or 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
export default function AppContainer() { | |
return ( | |
<View style={AppStyles.container}> | |
<Provider store={store}> | |
<RouterWithRedux scenes={AppRoutes} style={AppStyles.appContainer}/> | |
</Provider> | |
<DropdownAlert ref={ref => DropDownHolder.setDropDown(ref)} closeInterval={6000}/> | |
</View> | |
); | |
} |
This file contains hidden or 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
type AlertType = 'info' | 'warn' | 'error' | 'success' | |
export type DropdownType = { | |
alertWithType: (type: AlertType, title: string, message: string) => void | |
} | |
export class DropDownHolder { | |
static dropDown: DropdownType | |
static setDropDown(dropDown: DropdownType) { |
This file contains hidden or 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
export class App extends React.Component { | |
render() { | |
return ( | |
<View style={{width: '100%', height: '100%'}}> | |
<Nav/> | |
<DropdownAlert ref={(ref) => DropDownHolder.setDropDown(ref)}/> | |
</View> | |
) | |
} | |
} |