mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 19:59:20 +00:00
18 lines
411 B
JavaScript
18 lines
411 B
JavaScript
import React, { createContext } from "react";
|
|
|
|
import useWhatsApps from "../../hooks/useWhatsApps";
|
|
|
|
const WhatsAppsContext = createContext();
|
|
|
|
const WhatsAppsProvider = ({ children }) => {
|
|
const { loading, whatsApps } = useWhatsApps();
|
|
|
|
return (
|
|
<WhatsAppsContext.Provider value={{ whatsApps, loading }}>
|
|
{children}
|
|
</WhatsAppsContext.Provider>
|
|
);
|
|
};
|
|
|
|
export { WhatsAppsContext, WhatsAppsProvider };
|