import { useState, useEffect } from "react";
import { hasSavedGameInfo } from "../../../domain/localStorageMethods";

const useHasSavedInfo = () => {
  const [hasSavedInfo, setHasSavedInfo] = useState(false);
  useEffect(() => {
    hasSavedGameInfo().then(setHasSavedInfo);
  }, []);
  return hasSavedInfo;
};

export default useHasSavedInfo;
