import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import styled from 'styled-components'; const Input = styled.input` width: auto; flex: 1; `; export const LoginForm: React.VFC = () => { const [host, setHost] = useState(''); const {t} = useTranslation(); const login = () => { location.href = `//${location.host}/login?host=${encodeURIComponent(host)}`; }; return ( ); };