frontend/containers/LoginGoogle/index.tsx (view raw)
1import Box from '@mui/material/Box';
2import Button from '@mui/material/Button';
3import {useTheme} from '@mui/material/styles';
4import {signIn} from 'next-auth/react';
5import {useTranslation} from 'react-i18next';
6
7const LoginGoogle = () => {
8 const {t} = useTranslation();
9 const theme = useTheme();
10
11 return (
12 <Button
13 variant="outlined"
14 color="primary"
15 fullWidth
16 onClick={() => signIn('google', {callbackUrl: '/dashboard'})}
17 >
18 <Box
19 component="img"
20 sx={{marginRight: theme.spacing(1)}}
21 height="25px"
22 src="/assets/google-icon.svg"
23 alt="Google Login"
24 />
25 {t('signin.withGoogle')}
26 </Button>
27 );
28};
29
30export default LoginGoogle;