import { useEffect, useState } from "react"; import { Link } from "react-router-dom"; import { Button } from "../../commons"; import NavJump from "./NavJump"; import "./Nav.css"; function Nav({ pages, currentPage, addNewPage, isPageExists }) { const [isJumpEnabled, setIsJumpEnabled] = useState(false); const isCover = () => currentPage && currentPage.id === 0; const isFirstPage = () => currentPage && currentPage.id === 1; const is404 = () => currentPage && currentPage.id === null; useEffect(() => { setIsJumpEnabled(false); }, [currentPage.id]); return ( ); } export default Nav;