import { IonButton, IonContent, IonPage, IonToast } from '@ionic/react';
// import QuizzesMainMenuContainer from '../../components/QuizzesMainMenuContainer';
import './style.css';

import { useEffect, useState } from 'react';
import { Helloworld } from '../../public_data/index';
import { writeUserConfig } from './writeUserConfig';
import { readUserConfig } from './readUserConfig';
import { deleteUserConfig } from './deleteUserConfig';
import { initUserConfig } from './initUserConfig';
import { listAllUserConfig } from './listAllUserConfig';

const DebugPage: React.FC = () => {
  let [show_meta, setShowMeta] = useState({});
  let [read_result, setReadResult] = useState('');
  let [user_config_result, setUserConfigResult] = useState({});
  useEffect(() => {
    (async () => {
      let result = await Helloworld();
      console.log(result);
      setShowMeta(result);

      localStorage.setItem('hello', 'world');
      setReadResult(localStorage.getItem('hello') || '');
    })();
  }, []);

  const [isOpen, setIsOpen] = useState(false);

  return (
    <IonPage>
      <IonContent fullscreen>
        <div>My Achievement</div>
      </IonContent>
    </IonPage>
  );
};

export default DebugPage;
