developed new ui for new login and signup page

This commit is contained in:
Sheen Capadngan
2023-05-05 00:39:28 +08:00
parent 1172726e74
commit b734b51954
7 changed files with 94 additions and 43 deletions

View File

@@ -0,0 +1,36 @@
import { useTranslation } from 'react-i18next';
import Link from 'next/link';
import { getTranslatedStaticProps } from '@app/components/utilities/withTranslateProps';
export default function InitialLoginStep({
setIsLoginWithEmail,
}: {
setIsLoginWithEmail: (value: boolean) => void;
}) {
const { t } = useTranslation();
return <div className='flex flex-col mx-auto w-full justify-center items-center'>
<h1 className=' text-white text-center mb-5' >Login to Infisical</h1>
<div className='w-1/5 bg-green text-center p-3 rounded-md'>
<button type='button' className='text-black' onClick={() => {
window.open('/api/v1/oauth/redirect/google')
}}>
{t('login:continue-with-google')}
</button>
</div>
<div className='w-1/5 bg-black text-center p-3 rounded-md mt-4'>
<button type='button' className='text-white' onClick={() => {
setIsLoginWithEmail(true);
}}>
{t('login:continue-with-email')}
</button>
</div>
<Link href="/signup">
<h2 className='text-white mt-8 underline'>{t('login:create-account')}</h2>
</Link>
</div>
}
export const getStaticProps = getTranslatedStaticProps(['login']);