File size: 454 Bytes
0527ba9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
'use client';
import React, { createContext, useContext, useState } from 'react';
const TvShowsContext = createContext();
export const TvShowsProvider = ({ children }) => {
const [tvshows, setTvshows] = useState([]);
return (
<TvShowsContext.Provider value={{ tvshows, setTvshows }}>
{children}
</TvShowsContext.Provider>
);
};
export const useTvShowsContext = () => {
return useContext(TvShowsContext);
}; |