databag/net/web/src/context/ChannelContext.tsx
Roland Osborne 55e054abb5 Revert "making databag pretty, thanks @lil5"
This reverts commit afb7632edf6298536f16501e077c4cc0d47e7ac2.
2024-05-02 15:16:20 -07:00

15 lines
423 B
TypeScript

import { createContext } from 'react';
import { defaultChannelContext, useChannelContext } from './useChannelContext.hook';
export const ChannelContext = createContext(defaultChannelContext);
export function ChannelContextProvider({ children }) {
const { state, actions } = useChannelContext();
return (
<ChannelContext.Provider value={{ state, actions }}>
{children}
</ChannelContext.Provider>
);
}