Add onboarding screen + token check
This commit is contained in:
parent
b951d0a0bc
commit
f5c59f602a
19 changed files with 433 additions and 279 deletions
45
services/message.tsx
Normal file
45
services/message.tsx
Normal file
|
@ -0,0 +1,45 @@
|
|||
import Toast from 'react-native-toast-message';
|
||||
|
||||
export class Message {
|
||||
/**
|
||||
* Set success message
|
||||
*
|
||||
* @param message
|
||||
*/
|
||||
static success(message: string) {
|
||||
Message.send('success', message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send error message
|
||||
*
|
||||
* @param message
|
||||
*/
|
||||
static error(message: string) {
|
||||
Message.send('error', message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send info message
|
||||
*
|
||||
* @param message
|
||||
*/
|
||||
static info(message: string) {
|
||||
Message.send('info', message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send message
|
||||
*
|
||||
* @param type
|
||||
* @param message
|
||||
*/
|
||||
static send(type: string, message: string) {
|
||||
Toast.show({
|
||||
type: type,
|
||||
text1: message,
|
||||
position: 'bottom',
|
||||
})
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue