mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-12-22 19:53:49 +01:00
fixes eslint
This commit is contained in:
parent
40e9acc5a8
commit
bbb14eaeb6
@ -30,6 +30,7 @@
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "error",
|
||||
"@typescript-eslint/no-unused-vars": "error",
|
||||
"react/no-unknown-property": ["error", { "ignore": ["css"] }],
|
||||
"react-hooks/rules-of-hooks": "warn", // Checks rules of Hooks
|
||||
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
|
||||
"no-restricted-imports": [
|
||||
|
@ -408,16 +408,15 @@ class MockClient implements Client {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
wait(ms: number) {
|
||||
console.log('Start waiting');
|
||||
return new Promise((resolve, reject) => {
|
||||
wait(ms: number): Promise<number> {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
console.log('Done waiting');
|
||||
resolve(ms);
|
||||
}, ms);
|
||||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
processGoogleCallback(code: string): Promise<Oauth2CallbackResult> {
|
||||
// artificial delay for more realistic mock experience
|
||||
const handler = (success: (result: Oauth2CallbackResult) => void) => {
|
||||
@ -436,6 +435,7 @@ class MockClient implements Client {
|
||||
return new Promise(handler);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
confirmAccountSync(email: string, code: string): Promise<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
@ -659,7 +659,7 @@ export default class RestClient implements Client {
|
||||
.put(`${this.baseUrl}/service/users/confirmAccountSync?email=${email}&code=${code}`, {
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
})
|
||||
.then((response) => {
|
||||
.then(() => {
|
||||
success();
|
||||
})
|
||||
.catch((error) => {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import React from 'react';
|
||||
import { css } from '@emotion/react';
|
||||
import { Button } from '@mui/material';
|
||||
import GoogleIcon from '../google-icon';
|
||||
|
||||
const googleButtonStyle = css({
|
||||
color: '#000000',
|
||||
//fontSize: "15px",
|
||||
fontWeight: '300',
|
||||
border: '1px solid black',
|
||||
'&:hover': {
|
||||
@ -12,7 +12,15 @@ const googleButtonStyle = css({
|
||||
},
|
||||
});
|
||||
|
||||
const GoogleButton = ({ text, onClick }) => {
|
||||
type GoogleButtonProps = {
|
||||
text: string;
|
||||
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
||||
};
|
||||
|
||||
const GoogleButton: React.FunctionComponent<GoogleButtonProps> = ({
|
||||
text,
|
||||
onClick,
|
||||
}: GoogleButtonProps) => {
|
||||
return (
|
||||
<Button variant="outlined" css={googleButtonStyle} startIcon={GoogleIcon} onClick={onClick}>
|
||||
{text}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import React from 'react';
|
||||
import { SvgIcon } from '@mui/material';
|
||||
|
||||
const GoogleIconSvg = () => {
|
||||
|
@ -1,7 +1,18 @@
|
||||
import React from 'react';
|
||||
import { css } from '@emotion/react';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
|
||||
const Separator = ({ responsive, text, maxWidth = undefined }) => {
|
||||
type SeparatorProps = {
|
||||
responsive: boolean;
|
||||
text: string;
|
||||
maxWidth?: number;
|
||||
};
|
||||
|
||||
const Separator: React.FunctionComponent<SeparatorProps> = ({
|
||||
responsive,
|
||||
text,
|
||||
maxWidth = undefined,
|
||||
}: SeparatorProps) => {
|
||||
const theme = useTheme();
|
||||
|
||||
const containerStyle = css([
|
||||
|
@ -21,7 +21,6 @@ const RegistrationCallbackPage = (): React.ReactElement => {
|
||||
const [email, setEmail] = useState(undefined);
|
||||
const [syncCode, setSyncCode] = useState(undefined);
|
||||
const [googleSync, setGoogleSync] = useState(undefined);
|
||||
|
||||
const history = useHistory();
|
||||
|
||||
useEffect(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user