fixed eslint errors

This commit is contained in:
Moon Patel
2023-07-25 20:09:03 +05:30
parent 13fd73776d
commit b3b99a340a
7 changed files with 17 additions and 8 deletions
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -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
?
+1 -2
View File
@@ -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 -3
View File
@@ -1,7 +1,5 @@
import React from 'react'
const useQuery = () => {
}
export default useQuery
+1 -1
View File
@@ -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%'