Use undefined instead of null for conventional purposes.
This commit is contained in:
1 parent
00700c8651
commit
8994b4b39b
1 file changed
+2
-2
@@ -24,7 +24,7 @@ const FIELD_IDS = {
|
|||||||
*/
|
*/
|
||||||
const useNotifications = () => {
|
const useNotifications = () => {
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [error, setError] = useState(null);
|
const [error, setError] = useState(undefined);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -34,7 +34,7 @@ const useNotifications = () => {
|
|||||||
*/
|
*/
|
||||||
const sendTestNotification = async (type, config) => {
|
const sendTestNotification = async (type, config) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
setError(null);
|
setError(undefined);
|
||||||
|
|
||||||
// Validation based on notification type
|
// Validation based on notification type
|
||||||
let payload = { platform: type };
|
let payload = { platform: type };
|
||||||
|
|||||||
Reference in new issue
Block a user