This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/website/contexts/FunctionTabsContext.js

16 lines
423 B
JavaScript
Raw Normal View History

import React, { createContext, useState } from 'react';
export const FunctionTabsContext = createContext();
function FunctionTabsContextProvider(props) {
const [slideIndex, setSlideIndex] = useState(0);
return (
<FunctionTabsContext.Provider value={{ slideIndex, setSlideIndex }}>
{props.children}
</FunctionTabsContext.Provider>
);
}
export default FunctionTabsContextProvider;