panjareh
Version:
Panjareh using aparat and phoenix-video-player to play videos on desktops and tvs.
11 lines (10 loc) • 307 B
JavaScript
import { useContext } from "react";
import { UserContext } from "../context/user-context";
function useUserContext() {
const context = useContext(UserContext);
if (!context) {
throw new Error("useUserContext must be used within UserProvider");
}
return context;
}
export default useUserContext;