mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Merge master
This commit is contained in:
1 parent
d0de0e4bac
commit
2b96d93565
7 files changed
+12
-28
No files matched your search
@@ -6,7 +6,6 @@ import {
|
||||
Avatar as MuiAvatar,
|
||||
List,
|
||||
ListItem,
|
||||
makeStyles,
|
||||
} from '@material-ui/core';
|
||||
|
||||
import { useFilteredContacts } from '../../hooks/useFilteredContacts';
|
||||
@@ -22,21 +21,6 @@ import Nui from '../../../../os/nui-events/utils/Nui';
|
||||
|
||||
import '../Contact.css';
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
updateButton: {
|
||||
margin: 'auto',
|
||||
fontSize: 14,
|
||||
width: 150,
|
||||
background: '#2196f3',
|
||||
marginBottom: 10,
|
||||
padding: 8,
|
||||
},
|
||||
collapseItem: {
|
||||
margin: 'auto',
|
||||
width: '50%',
|
||||
},
|
||||
}));
|
||||
|
||||
export const ContactList = () => {
|
||||
const { filteredContacts } = useFilteredContacts();
|
||||
const { setShowContactModal } = useContactModal();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Snackbar } from '@material-ui/core';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import React, { useState, useEffect, useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Alert } from '../../../../ui/components/Alert';
|
||||
import { useContactAlert } from '../../hooks/useAlert';
|
||||
@@ -21,11 +21,11 @@ export const ContactAlert = () => {
|
||||
setAlert(null);
|
||||
};
|
||||
|
||||
function setMessageAlert(type: AlertCategory, severity: 'success' | 'error') {
|
||||
const setMessageAlert = useCallback((type: AlertCategory, severity: 'success' | 'error') => {
|
||||
setMessage(t(LOCALE_PREFIX + type));
|
||||
setSeverity(severity);
|
||||
setOpen(true);
|
||||
}
|
||||
}, [t]);
|
||||
|
||||
useEffect(() => {
|
||||
switch (alert) {
|
||||
@@ -47,7 +47,7 @@ export const ContactAlert = () => {
|
||||
case 'CONTACT_UPDATE_SUCCESS':
|
||||
setMessageAlert(alert, 'success');
|
||||
}
|
||||
}, [alert]);
|
||||
}, [alert, setMessageAlert]);
|
||||
|
||||
return (
|
||||
<Snackbar
|
||||
|
||||
Reference in new issue
Block a user