Skip to content

Commit b8870d2

Browse files
committed
fixed: payload errors and code smells
1 parent fc20e49 commit b8870d2

File tree

2 files changed

+98
-136
lines changed

2 files changed

+98
-136
lines changed

src/components/charts/list/ChartListPopUp.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useContext, useState } from 'react'
1+
import React, { useState } from 'react'
22
import { ChartListPopUpType } from '../charts.types'
33
import {
44
showError,
@@ -16,15 +16,14 @@ import { toast } from 'react-toastify'
1616
import { EMPTY_STATE_STATUS, TOAST_INFO } from '../../../config/constantMessaging'
1717
import { reSyncChartRepo } from '../../chartRepo/chartRepo.service'
1818
import { ReactComponent as Help } from '../../../assets/icons/ic-help.svg'
19-
import { NavLink, useHistory } from 'react-router-dom'
20-
import { SERVER_MODE, URLS } from '../../../config'
19+
import { NavLink } from 'react-router-dom'
20+
import { URLS } from '../../../config'
2121
import { ReactComponent as Add } from '../../../assets/icons/ic-add.svg'
2222
import EmptyFolder from '../../../assets/img/Empty-folder.png'
2323
import NoResults from '../../../assets/img/[email protected]'
2424
import AddChartSource from './AddChartSource'
2525
import ChartListPopUpRow from './ChartListPopUpRow'
2626
import { ReactComponent as SyncIcon } from '../../../assets/icons/ic-arrows_clockwise.svg'
27-
import { mainContext } from '../../common/navigation/NavigationRoutes'
2827

2928
function ChartListPopUp({
3029
onClose,
@@ -34,13 +33,11 @@ function ChartListPopUp({
3433
setFilteredChartList,
3534
setShowSourcePopoUp,
3635
}: ChartListPopUpType) {
37-
const { serverMode } = useContext(mainContext)
3836
const [searchApplied, setSearchApplied] = useState<boolean>(false)
3937
const [searchText, setSearchText] = useState<string>('')
4038
const [fetching, setFetching] = useState<boolean>(false)
4139
const [showAddPopUp, setShowAddPopUp] = useState<boolean>(false)
4240
const isEmpty = chartList.length && !filteredChartList.length
43-
const history = useHistory()
4441

4542
const setStore = (event): void => {
4643
setSearchText(event.target.value)

0 commit comments

Comments
 (0)