refactoring custom hooks
This commit is contained in:
parent
5041061e51
commit
4eba123994
6
src/hooks/useGame.jsx
Normal file
6
src/hooks/useGame.jsx
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import { useContext } from "react";
|
||||
import { GameContext } from "../context/GameContext";
|
||||
|
||||
export function useGame() {
|
||||
return useContext(GameContext);
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { useContext } from "react";
|
||||
import { UserContext } from "../context/UserContext";
|
||||
|
||||
export function useUserContext() {
|
||||
export function useUser() {
|
||||
return useContext(UserContext);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user