Skip to content

Commit

Permalink
eslint: fix lint errors after using next lint
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulrhmnGhanem committed Nov 4, 2022
1 parent 7cdff89 commit 474a76b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Board/BuyParts/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import styles from './index.module.scss'
const BuyParts = ({ projectFullName, lines, parts }) => {
const [extensionPresence, setExtensionPresence] = useState('unknown')
// it's needed to fix the extension integration.
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [buyParts, setBuyParts] = useState(null)
const [buyMultiplier, setBuyMultiplier] = useState(1)
const [mult, setMult] = useState(1)
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/DropZone.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import getConfig from 'next/config'

// `FileWithPath is used in the `fileCustomValidator` function typing.
// eslint-disable-next-line no-unused-vars
import { useDropzone, ErrorCode, FileWithPath } from 'react-dropzone'
import { useDropzone, ErrorCode } from 'react-dropzone'
import { fromEvent } from 'file-selector'
import { Button } from 'semantic-ui-react'

Expand Down
7 changes: 3 additions & 4 deletions frontend/src/components/NewProject/Upload/index.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { useState, useEffect, useCallback, useContext } from 'react'
import React, { useState, useContext } from 'react'
import { bool, func, number } from 'prop-types'
import { Loader, Progress } from 'semantic-ui-react'

import { useRouter } from 'next/router'

import { AuthContext } from '@contexts/AuthContext'
import { commitInitialFiles } from '@utils/giteaInternalApi'
import { createRepo, repoExists } from '@utils/giteaApi'
import { createRepo } from '@utils/giteaApi'
import { slugifiedNameFromFiles } from '@utils/index'
import DropZone from '@components/DropZone'
import { UploadOp, NoOp } from '../Ops'
Expand All @@ -28,7 +28,6 @@ const Upload = ({ setUserOp }) => {
setUserOp(UploadOp)

const tempProjectName = slugifiedNameFromFiles(droppedFiles)
console.log({ tempProjectName })
const repo = await createRepo(tempProjectName, '', apiToken)

setProjectName(tempProjectName)
Expand Down Expand Up @@ -96,14 +95,14 @@ const Upload = ({ setUserOp }) => {
/>
<UploadConflictModal
conflictModalOpen={conflictModalOpen}
originalProjectName={originalProjectName}
onClose={() => {
setUserOp(NoOp)
// Close the modal
setConflictModalOpen(false)
// reset the state as if the user didn't drop anything
setDroppedFiles([])
}}
originalProjectName={originalProjectName}
onDifferentName={onDifferentName}
onOverwrite={onUpdateToExisting}
/>
Expand Down

0 comments on commit 474a76b

Please sign in to comment.