Unused context provider

 avatar
user_9324270602
plain_text
3 years ago
430 B
4
Indexable
import { useContext } from "react";

const TrainContainersContext = useContext();

const K8S_VIEW = 'K8s'
const VM_VIEW = 'VM'

export const TrainContainersContextProvider = ({ children }) => {
    const [selectedView, setSelectedView] = useState(K8S_VIEW);
    
    return <TrainContainersContext.Provider value={{
        selectedView,
        setSelectedView
    }}>
        {children}
    </TrainContainersContext.Provider>;
}
Editor is loading...