Skip to content

Commit

Permalink
fix(puzzle): wrong router usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nullchilly committed Dec 7, 2023
1 parent fc2d26f commit c74a525
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks/usePuzzleChess.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
import { Chess } from "chess.js";
import { Puzzle } from "@/types";
import { router } from "next/client";
import { useRouter } from "next/navigation";
import { randomInt } from "crypto";

const NEXT_PUBLIC_BACKEND_URL = process.env.NEXT_PUBLIC_BACKEND_URL || "/api";
Expand All @@ -15,6 +15,7 @@ const usePuzzleChess = (puzzleData: Puzzle) => {
const [message, setMessage] = useState<string>("");
const [id, setId] = useState<string>("");
const [messHint, setMessHint] = useState<string>("");
const router = useRouter();

useEffect(() => {
if (puzzleData && puzzleData.fen) {
Expand Down

0 comments on commit c74a525

Please sign in to comment.