Unused context provider

 avatar
user_9324270602
plain_text
2 years ago
430 B
1
Indexable
Never
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>;
}