hiding tutorial when checked once
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
16beb9edb7
commit
4f757ec1e7
|
|
@ -23,6 +23,8 @@ export default function Tutorials() {
|
|||
document.querySelector("dialog").scrollTo(0, 0);
|
||||
}
|
||||
function startGame() {
|
||||
localStorage.setItem("hasAlreadyCheckedTutorial", true);
|
||||
|
||||
setIsTimeRuning(true);
|
||||
setHasCheckedTutorial(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ export const GameContext = createContext();
|
|||
export function GameContextProvider({ children }) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const hasAlreadyCheckedTutorial = localStorage.getItem("hasAlreadyCheckedTutorial") || false;
|
||||
|
||||
const { language, country } = useUser();
|
||||
|
||||
// ##### DATA #####
|
||||
|
|
@ -23,7 +25,7 @@ export function GameContextProvider({ children }) {
|
|||
const [remainingQuestionsAmount, setRemainingQuestionsAmount] = useState(null);
|
||||
|
||||
// ##### INTERFACE #####
|
||||
const [hasCheckedTutorial, setHasCheckedTutorial] = useState(false);
|
||||
const [hasCheckedTutorial, setHasCheckedTutorial] = useState(hasAlreadyCheckedTutorial);
|
||||
const [currentGameModal, setCurrentGameModal] = useState(null);
|
||||
const [isSoundOn, setIsSoundOn] = useState(true);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user