refactoring custom hooks

This commit is contained in:
Antoine M 2024-02-13 19:20:40 +01:00
parent 5041061e51
commit 4eba123994
2 changed files with 7 additions and 1 deletions

6
src/hooks/useGame.jsx Normal file
View File

@ -0,0 +1,6 @@
import { useContext } from "react";
import { GameContext } from "../context/GameContext";
export function useGame() {
return useContext(GameContext);
}

View File

@ -1,6 +1,6 @@
import { useContext } from "react"; import { useContext } from "react";
import { UserContext } from "../context/UserContext"; import { UserContext } from "../context/UserContext";
export function useUserContext() { export function useUser() {
return useContext(UserContext); return useContext(UserContext);
} }