import React from 'react'; import { RouteComponentProps } from '@reach/router'; import clsx from 'clsx'; import { LockClosedIcon } from '@heroicons/react/solid'; import { performApiCall } from 'src/services/api'; type LoginProps = RouteComponentProps; // eslint-disable-next-line @typescript-eslint/no-unused-vars export function Login(_: LoginProps) { const handleSubmit = async () => { try { const { data } = await performApiCall({ path: '/login', method: 'POST', }); if (data.authorizationUrl) { window.location.href = data.authorizationUrl; } } catch (e: any) { // continue } // @ts-ignore // if (res.ok) { // showToast('Logged in!'); // } else { // showToast('Username or password incorrect', ToastType.Error); // } }; // useEffect(() => { // if (isValid(auth)) { // navigate('/dashboard'); // } // }, [auth]); // if (isValid(auth)) { // return null; // } return (
Stackspin

Sign in

); }