mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Improve messages error handling (#181)
* Improve messages error handling * Add types to getPlayerFromIdentifier function * Add phone validation regex to message group form * Add correct alert types to enum * Improve locale * Improve error message for unregistered numbers
This commit is contained in:
1 parent
f27e486ff5
commit
107dc43624
9 files changed
+58
-23
No files matched your search
+1
-1
@@ -1,4 +1,4 @@
|
||||
export interface IAlertProps {
|
||||
message: string;
|
||||
type: 'success' | 'error';
|
||||
type: 'success' | 'error' | 'info' | 'warning';
|
||||
}
|
||||
@@ -30,6 +30,8 @@ export interface CreateMessageGroupResult {
|
||||
groupId?: string;
|
||||
mine?: boolean;
|
||||
identifiers?: string[];
|
||||
allNumbersFailed?: boolean;
|
||||
failedNumbers: string[];
|
||||
}
|
||||
|
||||
export interface CreateMessageBroadcast {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
export const PHONE_NUMBER_REGEX = /^([0-9]{3}-[0-9]{4})|([0-9]{7})$/;
|
||||
|
||||
export enum PhoneEvents {
|
||||
PLAYER_IS_READY = 'npwd:playerIsReady',
|
||||
OPEN_APP_CONTACTS = 'npwd:app:CONTACTS',
|
||||
|
||||
Reference in new issue
Block a user