import React, { useEffect } from 'react';
import './App.css';
import { ReactKeycloakProvider } from '@react-keycloak/web'
import keycloak from './keycloak'
import Login from './components/login';
import { LocalDataProvider } from './provider/LocalDataProvider';
import EDT from './components/edt';
import SwitchThemeColor from './components/SwitchThemeColor';
import CreateSession from './components/createSession'


const keycloakInitOptions = {
  onLoad: 'login-required',
  checkLoginIframe: false
}


function App() {


  return (
    <ReactKeycloakProvider authClient={keycloak} /*initOptions={keycloakInitOptions}*/>
      <LocalDataProvider>
        <div className="App">
            <SwitchThemeColor/>
            <h1>Frisbyee</h1>
            <Login/>
            <EDT/>
            <CreateSession/>
        </div>
      </LocalDataProvider>
    </ReactKeycloakProvider>
  );
}

export default App;
