import { FormEvent, Fragment, useState } from 'react'; // Redux import { useDispatch, useSelector } from 'react-redux'; import { bindActionCreators } from 'redux'; import { actionCreators } from '../../../store'; import { State } from '../../../store/reducers'; // UI import { Button, InputGroup, SettingsHeadline } from '../../UI'; // CSS import classes from './AppDetails.module.css'; // Utils import { checkVersion } from '../../../utility'; export const AppDetails = (): JSX.Element => { const { isAuthenticated } = useSelector((state: State) => state.auth); const dispatch = useDispatch(); const { login, logout } = bindActionCreators(actionCreators, dispatch); const [password, setPassword] = useState(''); const formHandler = (e: FormEvent) => { e.preventDefault(); login(password); setPassword(''); }; return ( {!isAuthenticated ? (
setPassword(e.target.value)} /> See {` project wiki `} to read more about authentication
) : (

You are logged in. Your session will expire @@@@

)}

Flame {' '} version {process.env.REACT_APP_VERSION}

See changelog{' '} here

); };