[Update] Add network error notification.
This commit is contained in:
1 parent
07723d495a
commit
0592695f1f
3 files changed
+22
-2
No files matched your search
@@ -9,4 +9,5 @@ export { useNotificationStatus } from "./useNotificationStatus";
|
||||
export { useOpenFolder } from "./useOpenFolder";
|
||||
export { useMessage } from "./useMessage";
|
||||
export { useUpdateSoftware } from "./useUpdateSoftware";
|
||||
export { useVolume } from "./useVolume";
|
||||
export { useVolume } from "./useVolume";
|
||||
export { useHandleNetworkConnection } from "./useHandleNetworkConnection";
|
||||
@@ -0,0 +1,16 @@
|
||||
import { useNotificationStatus } from "@logics_common";
|
||||
|
||||
export const useHandleNetworkConnection = () => {
|
||||
|
||||
const { showNotification_Error } = useNotificationStatus();
|
||||
|
||||
const handleNetworkConnection = (is_network_connected) => {
|
||||
if (!is_network_connected) {
|
||||
showNotification_Error("Network is not connected. Some of the function will not work.");
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
handleNetworkConnection,
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user