diff --git a/src/pages/Home.js b/src/pages/Home.js index 6c969eb..94cfa0d 100644 --- a/src/pages/Home.js +++ b/src/pages/Home.js @@ -4,26 +4,24 @@ import Layout from "../components/Layout"; import { getLastOpenId } from "../utils"; export default function Home() { - const lastId = getLastOpenId(); - const navigate = useNavigate(); + const lastId = getLastOpenId(); + const navigate = useNavigate(); - useEffect(() => { - if ( - lastId && - // eslint-disable-next-line no-restricted-globals - confirm("You have a last edited note,\nDo you want to open it?") - ) { - navigate(`/n/${lastId}`); - } else { - navigate(`/new`); - } - }, [navigate, lastId]); + useEffect(() => { + if ( + lastId && + // eslint-disable-next-line no-restricted-globals + confirm("You have a last edited note,\nDo you want to open it?") + ) { + navigate(`/n/${lastId}`); + } else { + navigate(`/new`); + } + }, [navigate, lastId]); - console.log('Home', { lastId }); - - return ( - -
Loading...
-
- ); + return ( + +
Loading...
+
+ ); }