mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-02 02:30:29 +00:00
Hide google login button and update login logic
This commit is contained in:
@@ -4,7 +4,7 @@ import { useMutation } from '@apollo/client';
|
|||||||
import { useHistory } from 'react-router';
|
import { useHistory } from 'react-router';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { tokenVar, roleVar, userVar } from '../../../graphql/state';
|
import { tokenVar, roleVar, userVar } from '../../../graphql/state';
|
||||||
import { Google, Login as LoginIllustration, Logo } from '../../../assets';
|
import { Login as LoginIllustration, Logo } from '../../../assets';
|
||||||
import { Alert, Box, Button, Input, Link, Text } from '../../../components';
|
import { Alert, Box, Button, Input, Link, Text } from '../../../components';
|
||||||
import { theme } from '../../../themes';
|
import { theme } from '../../../themes';
|
||||||
import { Wrapper } from './styles';
|
import { Wrapper } from './styles';
|
||||||
@@ -38,6 +38,7 @@ const Login = () => {
|
|||||||
}
|
}
|
||||||
tokenVar(token);
|
tokenVar(token);
|
||||||
userVar(user);
|
userVar(user);
|
||||||
|
localStorage.setItem('token', token);
|
||||||
history.push('/');
|
history.push('/');
|
||||||
},
|
},
|
||||||
onError({ graphQLErrors }) {
|
onError({ graphQLErrors }) {
|
||||||
@@ -134,13 +135,13 @@ const Login = () => {
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
/>
|
/>
|
||||||
<Button
|
{/* <Button
|
||||||
variant='secondary-action'
|
variant='secondary-action'
|
||||||
fullWidth
|
fullWidth
|
||||||
color='client'
|
color='client'
|
||||||
text='Login with Google'
|
text='Login with Google'
|
||||||
iconLeft={<Google />}
|
iconLeft={<Google />}
|
||||||
/>
|
/> */}
|
||||||
</Box>
|
</Box>
|
||||||
<Box display='flex' flexDirection='row'>
|
<Box display='flex' flexDirection='row'>
|
||||||
<Box flexGrow='1'>
|
<Box flexGrow='1'>
|
||||||
|
|||||||
Reference in New Issue
Block a user