mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 12:19:16 +00:00
feat: show an alert when connection with whatsapp brokes
This commit is contained in:
17
frontend/src/context/WhatsApp/WhatsAppsContext.js
Normal file
17
frontend/src/context/WhatsApp/WhatsAppsContext.js
Normal 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 };
|
||||
Reference in New Issue
Block a user