feat: show an alert when connection with whatsapp brokes

This commit is contained in:
canove
2020-10-27 19:59:38 -03:00
parent 79e27b71cc
commit 4e259a3de7
13 changed files with 360 additions and 296 deletions

View File

@@ -0,0 +1,17 @@
import React, { createContext } from "react";
import useWhatsApps from "./useWhatsApps";
const WhatsAppsContext = createContext();
const WhatsAppsProvider = ({ children }) => {
const { loading, whatsApps } = useWhatsApps();
return (
<WhatsAppsContext.Provider value={{ whatsApps, loading }}>
{children}
</WhatsAppsContext.Provider>
);
};
export { WhatsAppsContext, WhatsAppsProvider };