fixed eslint errors
This commit is contained in:
@@ -41,7 +41,7 @@ const Logout = () => {
|
||||
<Modal opened={isOpen} onClose={close} title={<Title order={3}>Logout</Title>} centered>
|
||||
<Text>Are you sure you want to logout?</Text>
|
||||
<Flex gap={'sm'} my="20px">
|
||||
<form onClick={logoutHandler}>
|
||||
<form onSubmit={logoutHandler}>
|
||||
<Button loading={isLoading} type="submit" color='red' px='xl'>Logout</Button>
|
||||
</form>
|
||||
<Button disabled={isLoading} color='gray'>Cancel</Button>
|
||||
|
||||
@@ -11,7 +11,7 @@ const MainLoader = ({ errorMessage }) => {
|
||||
<>
|
||||
{
|
||||
createPortal(<div style={{ position: 'absolute', backgroundColor: '#272321', width: '100vw', height: '100vh', top: 0, left: 0, display: 'flex', flexDirection: 'column', placeItems: 'center', zIndex: 1000 }}>
|
||||
<img draggable='false' src={loaderImage} style={{ width: '300px', height: '300px', marginTop: '180px', display: 'block' }} />
|
||||
<img draggable='false' alt='chessboard' src={loaderImage} style={{ width: '300px', height: '300px', marginTop: '180px', display: 'block' }} />
|
||||
{
|
||||
errorMessage
|
||||
?
|
||||
|
||||
@@ -48,7 +48,7 @@ const NavbarLink = ({ label, icon, to, index, active, setActive }) => {
|
||||
|
||||
NavbarLink.propTypes = {
|
||||
label: PropTypes.string,
|
||||
icon: PropTypes.func,
|
||||
icon: PropTypes.object,
|
||||
to: PropTypes.string,
|
||||
index: PropTypes.number,
|
||||
active: PropTypes.number,
|
||||
@@ -59,7 +59,6 @@ const linksList = [
|
||||
{ label: 'Home', icon: <HomeIcon />, to: "/home" },
|
||||
{ label: 'Play Chess', icon: <PlayIcon />, to: "/play" },
|
||||
{ label: 'Settings', icon: <GearIcon />, to: "/settings" },
|
||||
|
||||
]
|
||||
|
||||
export default NavbarLinks
|
||||
@@ -1,5 +1,7 @@
|
||||
import React, { createContext, useReducer, useRef, useState } from 'react'
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { socket } from '../socket';
|
||||
import { ChessModified, chessInit } from '../utils/chess';
|
||||
|
||||
@@ -237,4 +239,8 @@ const ChessGameContextProvider = ({ children }) => {
|
||||
)
|
||||
}
|
||||
|
||||
ChessGameContextProvider.propTypes = {
|
||||
children: PropTypes.object
|
||||
}
|
||||
|
||||
export default ChessGameContextProvider
|
||||
@@ -1,5 +1,7 @@
|
||||
import React, { createContext, useEffect, useState } from 'react'
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
export const UserDataContext = createContext();
|
||||
|
||||
const UserDataContextProvider = ({ children }) => {
|
||||
@@ -39,5 +41,9 @@ const UserDataContextProvider = ({ children }) => {
|
||||
)
|
||||
}
|
||||
|
||||
UserDataContextProvider.propTypes = {
|
||||
children: PropTypes.object
|
||||
}
|
||||
|
||||
|
||||
export default UserDataContextProvider
|
||||
@@ -1,7 +1,5 @@
|
||||
import React from 'react'
|
||||
|
||||
const useQuery = () => {
|
||||
|
||||
|
||||
}
|
||||
|
||||
export default useQuery
|
||||
@@ -8,7 +8,7 @@ import MainLoader from '../components/MainLoader';
|
||||
import NavbarLinks from '../components/NavbarLinks';
|
||||
import Logout from '../components/Logout';
|
||||
|
||||
const useStyles = createStyles((theme) => ({
|
||||
const useStyles = createStyles(() => ({
|
||||
body: {
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
|
||||
Reference in New Issue
Block a user