-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 26.4 KB
/
.eslintcache
1
[{"/Users/agata/Desktop/covid-app/src/index.tsx":"1","/Users/agata/Desktop/covid-app/src/App.tsx":"2","/Users/agata/Desktop/covid-app/src/hooks/useApi.ts":"3","/Users/agata/Desktop/covid-app/src/reportWebVitals.ts":"4","/Users/agata/Desktop/covid-app/src/components/search/Search.tsx":"5","/Users/agata/Desktop/covid-app/src/components/table/Table.tsx":"6","/Users/agata/Desktop/covid-app/src/components/table/utils/filters/index.ts":"7","/Users/agata/Desktop/covid-app/src/components/chart/Chart.tsx":"8","/Users/agata/Desktop/covid-app/src/hooks/index.ts":"9","/Users/agata/Desktop/covid-app/src/components/chart/index.ts":"10","/Users/agata/Desktop/covid-app/src/components/search/index.ts":"11","/Users/agata/Desktop/covid-app/src/components/table/index.ts":"12","/Users/agata/Desktop/covid-app/src/context/index.ts":"13","/Users/agata/Desktop/covid-app/src/app.tsx":"14","/Users/agata/Desktop/covid-app/src/components/covid-app.tsx":"15","/Users/agata/Desktop/covid-app/src/features/index.ts":"16","/Users/agata/Desktop/covid-app/src/features/types.ts":"17","/Users/agata/Desktop/covid-app/src/features/covid-cases-chart/index.ts":"18","/Users/agata/Desktop/covid-app/src/features/covid-cases-table/index.ts":"19","/Users/agata/Desktop/covid-app/src/features/covid-cases-chart/datasets.ts":"20","/Users/agata/Desktop/covid-app/src/features/covid-cases-table/utils.ts":"21","/Users/agata/Desktop/covid-app/src/features/covid-cases-chart/covid-cases-chart.tsx":"22","/Users/agata/Desktop/covid-app/src/features/covid-cases-table/covid-cases-table.tsx":"23","/Users/agata/Desktop/covid-app/src/features/covid-cases-table/columns.tsx":"24","/Users/agata/Desktop/covid-app/src/components/shared/button-to-navigate.tsx":"25","/Users/agata/Desktop/covid-app/src/components/shared/index.ts":"26","/Users/agata/Desktop/covid-app/src/services/index.ts":"27","/Users/agata/Desktop/covid-app/src/components/chart/chart.tsx":"28","/Users/agata/Desktop/covid-app/src/components/table/table.tsx":"29","/Users/agata/Desktop/covid-app/src/components/table/table-container.tsx":"30","/Users/agata/Desktop/covid-app/src/services/urls.tsx":"31","/Users/agata/Desktop/covid-app/src/components/table/utils/pagination/index.ts":"32","/Users/agata/Desktop/covid-app/src/components/table/utils/pagination/types.ts":"33","/Users/agata/Desktop/covid-app/src/components/table/utils/pagination/button.tsx":"34","/Users/agata/Desktop/covid-app/src/components/table/utils/pagination/pagination.tsx":"35","/Users/agata/Desktop/covid-app/src/components/table/utils/filters/default-column-filter.tsx":"36","/Users/agata/Desktop/covid-app/src/context/search-context.tsx":"37","/Users/agata/Desktop/covid-app/src/components/search/search.tsx":"38","/Users/agata/Desktop/covid-app/src/components/table/footer/index.ts":"39","/Users/agata/Desktop/covid-app/src/components/table/header/index.ts":"40","/Users/agata/Desktop/covid-app/src/components/table/header/header.tsx":"41","/Users/agata/Desktop/covid-app/src/components/table/footer/footer.tsx":"42","/Users/agata/Desktop/covid-app/src/context/cases-summary.tsx":"43","/Users/agata/Desktop/covid-app/src/context/types.ts":"44"},{"size":557,"mtime":1608558953571,"results":"45","hashOfConfig":"46"},{"size":403,"mtime":1608563176380,"results":"47","hashOfConfig":"46"},{"size":1693,"mtime":1608476504651,"results":"48","hashOfConfig":"46"},{"size":425,"mtime":1608155480839,"results":"49","hashOfConfig":"46"},{"size":3898,"mtime":1608502701649,"results":"50","hashOfConfig":"51"},{"size":2967,"mtime":1608476156578,"results":"52","hashOfConfig":"51"},{"size":40,"mtime":1608559029337,"results":"53","hashOfConfig":"46"},{"size":598,"mtime":1608501585207,"results":"54","hashOfConfig":"51"},{"size":26,"mtime":1608417226599,"results":"55","hashOfConfig":"46"},{"size":25,"mtime":1608550921071,"results":"56","hashOfConfig":"46"},{"size":25,"mtime":1608472231672,"results":"57","hashOfConfig":"51"},{"size":112,"mtime":1608559041159,"results":"58","hashOfConfig":"46"},{"size":91,"mtime":1608562751812,"results":"59","hashOfConfig":"46"},{"size":309,"mtime":1608558845536,"results":"60","hashOfConfig":"51"},{"size":387,"mtime":1608559156863,"results":"61","hashOfConfig":"46"},{"size":98,"mtime":1608550755275,"results":"62","hashOfConfig":"46"},{"size":270,"mtime":1608550710109,"results":"63","hashOfConfig":"46"},{"size":64,"mtime":1608548403624,"results":"64","hashOfConfig":"46"},{"size":89,"mtime":1608553491221,"results":"65","hashOfConfig":"46"},{"size":380,"mtime":1608548370515,"results":"66","hashOfConfig":"46"},{"size":189,"mtime":1608550761639,"results":"67","hashOfConfig":"46"},{"size":1004,"mtime":1608570291973,"results":"68","hashOfConfig":"46"},{"size":640,"mtime":1608570426639,"results":"69","hashOfConfig":"46"},{"size":939,"mtime":1608560435123,"results":"70","hashOfConfig":"46"},{"size":435,"mtime":1608558993469,"results":"71","hashOfConfig":"46"},{"size":37,"mtime":1608558995622,"results":"72","hashOfConfig":"46"},{"size":23,"mtime":1608546055139,"results":"73","hashOfConfig":"46"},{"size":372,"mtime":1608559732548,"results":"74","hashOfConfig":"46"},{"size":2385,"mtime":1608560080316,"results":"75","hashOfConfig":"46"},{"size":511,"mtime":1608570428330,"results":"76","hashOfConfig":"46"},{"size":104,"mtime":1608554752421,"results":"77","hashOfConfig":"46"},{"size":80,"mtime":1608559033349,"results":"78","hashOfConfig":"46"},{"size":496,"mtime":1608559037499,"results":"79","hashOfConfig":"46"},{"size":477,"mtime":1608559031349,"results":"80","hashOfConfig":"46"},{"size":758,"mtime":1608560232760,"results":"81","hashOfConfig":"46"},{"size":478,"mtime":1608559026057,"results":"82","hashOfConfig":"46"},{"size":1154,"mtime":1608554874395,"results":"83","hashOfConfig":"46"},{"size":3840,"mtime":1608570842628,"results":"84","hashOfConfig":"46"},{"size":25,"mtime":1608558999279,"results":"85","hashOfConfig":"46"},{"size":25,"mtime":1608559002679,"results":"86","hashOfConfig":"46"},{"size":118,"mtime":1608559000908,"results":"87","hashOfConfig":"46"},{"size":118,"mtime":1608558997929,"results":"88","hashOfConfig":"46"},{"size":2606,"mtime":1608563517632,"results":"89","hashOfConfig":"46"},{"size":181,"mtime":1608562781889,"results":"90","hashOfConfig":"46"},{"filePath":"91","messages":"92","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},"tla6z8",{"filePath":"94","messages":"95","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"96","messages":"97","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"98","messages":"99","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"100","messages":"101","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"3hxgdl",{"filePath":"102","messages":"103","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"104","usedDeprecatedRules":"105"},{"filePath":"106","messages":"107","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"108","messages":"109","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"105"},{"filePath":"110","messages":"111","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"112","messages":"113","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"114","messages":"115","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"116"},{"filePath":"117","messages":"118","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"119","messages":"120","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"121","messages":"122","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"123","messages":"124","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"125","messages":"126","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"127","messages":"128","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"129","messages":"130","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"131","messages":"132","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"133","messages":"134","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"135","messages":"136","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"137","messages":"138","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"139","messages":"140","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"141","messages":"142","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"143","usedDeprecatedRules":"93"},{"filePath":"144","messages":"145","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"146","usedDeprecatedRules":"93"},{"filePath":"147","messages":"148","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"149","messages":"150","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"151","messages":"152","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"153","messages":"154","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"155","messages":"156","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"157","messages":"158","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"159","messages":"160","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"161","messages":"162","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"163","messages":"164","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"165","messages":"166","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"167","messages":"168","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"169","usedDeprecatedRules":"93"},{"filePath":"170","messages":"171","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"172","messages":"173","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"174","messages":"175","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"176","messages":"177","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"178","messages":"179","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"180","messages":"181","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},{"filePath":"182","messages":"183","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"184","usedDeprecatedRules":"93"},{"filePath":"185","messages":"186","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"93"},"/Users/agata/Desktop/covid-app/src/index.tsx",[],["187","188"],"/Users/agata/Desktop/covid-app/src/App.tsx",[],"/Users/agata/Desktop/covid-app/src/hooks/useApi.ts",[],"/Users/agata/Desktop/covid-app/src/reportWebVitals.ts",[],"/Users/agata/Desktop/covid-app/src/components/search/Search.tsx",[],"/Users/agata/Desktop/covid-app/src/components/table/Table.tsx",["189","190"],"import React, {Fragment } from 'react';\nimport {useTable, useFilters, usePagination, Row, Cell, UseTableOptions, UseFiltersColumnProps} from 'react-table';\nimport {useSearchState} from \"../../context/SearchContext\";\nimport {DefaultColumnFilter} from './utils/filters';\n\n\nexport const Table = ({columns, data }: UseTableOptions<any>) => {\n const search = useSearchState();\n\n const defaultColumn = React.useMemo(\n () => ({\n Header: '',\n Filter: DefaultColumnFilter,\n }),\n []\n )\n\n // useTable\n const {\n getTableProps,\n getTableBodyProps,\n headerGroups,\n prepareRow,\n footerGroups,\n //@ts-ignore\n page,\n //@ts-ignore\n\n canPreviousPage,\n //@ts-ignore\n\n canNextPage,\n //@ts-ignore\n\n pageOptions,\n //@ts-ignore\n\n nextPage,\n //@ts-ignore\n\n previousPage,\n //@ts-ignore\n\n state: { pageIndex, pageSize },\n } = useTable(\n {\n columns,\n data,\n defaultColumn,\n initialState: { pageIndex: 0 , pageSize: 20},\n\n\n } as UseTableOptions<any>,\n useFilters,\n usePagination\n )\n \n // Render the UI for your table\n return (\n <Fragment>\n <table className=\"table\"\n {...getTableProps()}>\n <thead className=\"thead-light\">\n {headerGroups.map(headerGroup => (\n <tr {...headerGroup.getHeaderGroupProps()}>\n {headerGroup.headers.map(column => (\n <th scope=\"col\" {...column.getHeaderProps()}>\n {column.render('Header')}\n {/* Render the columns filter UI */}\n\n \n <div>{(column as unknown as UseFiltersColumnProps<any>).canFilter && column.Header === 'Country' ? column.render('Filter') : null}</div>\n </th>\n ))}\n </tr>\n ))}\n </thead>\n <tbody {...getTableBodyProps()}>\n {page.map((row: Row<object>, i: number) => {\n prepareRow(row)\n return (\n <tr {...row.getRowProps()}>\n {row.cells.map((cell: Cell) => {\n return <td {...cell.getCellProps()}>{cell.render('Cell')}</td>\n })}\n </tr>\n )\n })}\n </tbody>\n\n <tfoot>\n {footerGroups.map(group => (\n <tr {...group.getFooterGroupProps()}>\n {group.headers.map(column => (\n <td {...column.getFooterProps()}>{column.render('Footer')}</td>\n ))}\n </tr>\n ))}\n </tfoot>\n </table>\n\n <div className=\"pagination\">\n \n <button onClick={() => previousPage()} disabled={!canPreviousPage}>\n {'<'}\n </button>{' '}\n <button onClick={() => nextPage()} disabled={!canNextPage}>\n {'>'}\n </button>{' '}\n <span>\n Page{' '}\n <strong>\n {pageIndex + 1} of {pageOptions.length}\n </strong>{' '}\n </span>\n \n </div>\n </Fragment>\n )\n}\n",["191","192"],"/Users/agata/Desktop/covid-app/src/components/table/utils/filters/index.ts",[],"/Users/agata/Desktop/covid-app/src/components/chart/Chart.tsx",[],"/Users/agata/Desktop/covid-app/src/hooks/index.ts",[],"/Users/agata/Desktop/covid-app/src/components/chart/index.ts",[],"/Users/agata/Desktop/covid-app/src/components/search/index.ts",[],["193","194"],"/Users/agata/Desktop/covid-app/src/components/table/index.ts",[],"/Users/agata/Desktop/covid-app/src/context/index.ts",[],"/Users/agata/Desktop/covid-app/src/app.tsx",[],"/Users/agata/Desktop/covid-app/src/components/covid-app.tsx",[],"/Users/agata/Desktop/covid-app/src/features/index.ts",[],"/Users/agata/Desktop/covid-app/src/features/types.ts",[],"/Users/agata/Desktop/covid-app/src/features/covid-cases-chart/index.ts",[],"/Users/agata/Desktop/covid-app/src/features/covid-cases-table/index.ts",[],"/Users/agata/Desktop/covid-app/src/features/covid-cases-chart/datasets.ts",[],"/Users/agata/Desktop/covid-app/src/features/covid-cases-table/utils.ts",[],"/Users/agata/Desktop/covid-app/src/features/covid-cases-chart/covid-cases-chart.tsx",["195","196","197"],"/Users/agata/Desktop/covid-app/src/features/covid-cases-table/covid-cases-table.tsx",["198","199"],"/Users/agata/Desktop/covid-app/src/features/covid-cases-table/columns.tsx",["200","201","202"],"import React from 'react';\nimport { TableInstance } from 'react-table';\nimport {getTotalCount} from \"./index\";\n\nexport const columns = [\n {\n Header: 'Country',\n accessor: 'Country',\n },\n {\n Header: 'Deaths',\n accessor: 'NewDeaths',\n Footer: (info: TableInstance) => {\n const total = React.useMemo(() => getTotalCount(info, 'NewDeaths'), [info.filteredRows])\n return <>Total: <div>{total}</div></>\n },\n },\n {\n Header: 'Recovered',\n accessor: 'NewRecovered',\n Footer: (info: TableInstance) => {\n const total = React.useMemo(() => getTotalCount(info, 'NewRecovered'), [info.filteredRows])\n return <>Total: <div>{total}</div></>\n }\n\n }, {\n Header: 'New Cases',\n accessor: 'NewConfirmed',\n Footer: (info: TableInstance) => {\n const total = React.useMemo(() => getTotalCount(info, 'NewConfirmed'), [info.filteredRows])\n return <>Total: <div>{total}</div></>\n }\n }\n];","/Users/agata/Desktop/covid-app/src/components/shared/button-to-navigate.tsx",["203","204"],"import React from 'react';\nimport {useHistory} from 'react-router-dom';\n\ninterface ButtonToNavigate {\n title: string;\n path: string;\n}\n\nexport const ButtonToNavigate = ({ title, path }: ButtonToNavigate) => {\n const history = useHistory();\n \n const onClick = () => {\n history.push(path);\n }\n\n return (\n <button\n type=\"button\"\n className=\"btn btn-info\"\n onClick={onClick}>\n {title}\n </button>\n );\n}\n","/Users/agata/Desktop/covid-app/src/components/shared/index.ts",[],"/Users/agata/Desktop/covid-app/src/services/index.ts",[],"/Users/agata/Desktop/covid-app/src/components/chart/chart.tsx",[],"/Users/agata/Desktop/covid-app/src/components/table/table.tsx",[],"/Users/agata/Desktop/covid-app/src/components/table/table-container.tsx",["205"],"/Users/agata/Desktop/covid-app/src/services/urls.tsx",[],"/Users/agata/Desktop/covid-app/src/components/table/utils/pagination/index.ts",[],"/Users/agata/Desktop/covid-app/src/components/table/utils/pagination/types.ts",[],"/Users/agata/Desktop/covid-app/src/components/table/utils/pagination/button.tsx",[],"/Users/agata/Desktop/covid-app/src/components/table/utils/pagination/pagination.tsx",[],"/Users/agata/Desktop/covid-app/src/components/table/utils/filters/default-column-filter.tsx",["206"],"import React, { useEffect } from 'react';\nimport {Search} from '../../../search/search';\nimport { UseFiltersColumnProps } from 'react-table';\nimport { useSearchState } from '../../../../context';\n\ninterface FilteredColumn {\n column: UseFiltersColumnProps<any>\n}\nexport const DefaultColumnFilter = ({\n column: { setFilter }\n}: FilteredColumn) => {\n\n const state = useSearchState();\n useEffect(() => {\n setFilter(state);\n }, [state]);\n\n return (\n <Search />\n )\n}\n\n\n","/Users/agata/Desktop/covid-app/src/context/search-context.tsx",[],"/Users/agata/Desktop/covid-app/src/components/search/search.tsx",[],"/Users/agata/Desktop/covid-app/src/components/table/footer/index.ts",[],"/Users/agata/Desktop/covid-app/src/components/table/header/index.ts",[],"/Users/agata/Desktop/covid-app/src/components/table/header/header.tsx",[],"/Users/agata/Desktop/covid-app/src/components/table/footer/footer.tsx",[],"/Users/agata/Desktop/covid-app/src/context/cases-summary.tsx",["207"],"import React, {createContext, useContext, useReducer, useEffect} from 'react';\nimport axios from 'axios';\nimport {Action, STATUS} from '../context';\nimport {URLS} from '../services';\nimport { CountryData } from '../features';\n\ntype Dispatch = (state: any) => void\ntype CasesProviderProps = {children: React.ReactNode};\n\n// TODO: Change any to types!\nconst dataFetchReducer = (state: any, action: Action) => {\n switch (action.type) {\n case STATUS.INIT:\n return {\n ...state,\n isLoading: true,\n isError: false\n };\n case STATUS.SUCCESS:\n return {\n ...state,\n isLoading: false,\n isError: false,\n data: action.payload,\n };\n case STATUS.FAILURE:\n return {\n ...state,\n isLoading: false,\n isError: true,\n };\n default:\n\n // add typescript never function !\n throw new Error();\n }\n};\n\n\n// TODO: Type data properly\ninterface State {\n isLoading: boolean;\n isError: boolean;\n data: any;\n}\n\nconst CasesStateContext = createContext<State | undefined>(undefined);\nconst CasesDispatchContext = createContext<Dispatch | undefined>(undefined);\n\nconst CasesProvider = ({children}: CasesProviderProps) => {\n const [state, dispatch] = useReducer(dataFetchReducer, {\n isLoading: false,\n isError: false,\n data: null,\n });\n\n useEffect(() => {\n let didCancel = false;\n\n const fetchData = async () => {\n dispatch({ type: STATUS.INIT });\n\n try {\n\n const result = await axios.get(URLS.SUMMARY, {\n headers: {\n 'Authorization': 'X-Access-Token5cf9dfd5-3449-485e-b5ae-70a60e997864'\n }\n }\n );\n\n if (!didCancel) {\n dispatch({ type: STATUS.SUCCESS, payload: result.data });\n }\n\n } catch (error) {\n if (!didCancel) {\n dispatch({ type: STATUS.FAILURE });\n\n }\n }\n };\n \n fetchData();\n\n }, []);\n\n\n return (\n <CasesStateContext.Provider value={state}>\n <CasesDispatchContext.Provider value={dispatch}>\n {children}\n </CasesDispatchContext.Provider>\n </CasesStateContext.Provider>\n )\n}\n\nconst useCasesState = () => {\n const context = useContext(CasesStateContext)\n if (context == null) {\n throw new Error('useCasesState must be used within a SearchProvider')\n }\n return context\n}\n\nconst useCasesDispatch = () => {\n const context = useContext(CasesDispatchContext)\n if (context == null) {\n throw new Error('useCasesDispatch must be used within a SearchProvider')\n }\n return context\n}\n\n\nexport {useCasesDispatch, useCasesState, CasesProvider}","/Users/agata/Desktop/covid-app/src/context/types.ts",[],{"ruleId":"208","replacedBy":"209"},{"ruleId":"210","replacedBy":"211"},{"ruleId":"212","severity":1,"message":"213","line":8,"column":9,"nodeType":"214","messageId":"215","endLine":8,"endColumn":15},{"ruleId":"212","severity":1,"message":"216","line":44,"column":25,"nodeType":"214","messageId":"215","endLine":44,"endColumn":33},{"ruleId":"208","replacedBy":"217"},{"ruleId":"210","replacedBy":"218"},{"ruleId":"208","replacedBy":"219"},{"ruleId":"210","replacedBy":"220"},{"ruleId":"212","severity":1,"message":"221","line":9,"column":16,"nodeType":"214","messageId":"215","endLine":9,"endColumn":23},{"ruleId":"212","severity":1,"message":"222","line":9,"column":25,"nodeType":"214","messageId":"215","endLine":9,"endColumn":34},{"ruleId":"212","severity":1,"message":"223","line":14,"column":11,"nodeType":"214","messageId":"215","endLine":14,"endColumn":20},{"ruleId":"212","severity":1,"message":"221","line":8,"column":16,"nodeType":"214","messageId":"215","endLine":8,"endColumn":23},{"ruleId":"212","severity":1,"message":"222","line":8,"column":25,"nodeType":"214","messageId":"215","endLine":8,"endColumn":34},{"ruleId":"224","severity":1,"message":"225","line":14,"column":75,"nodeType":"226","endLine":14,"endColumn":94,"suggestions":"227"},{"ruleId":"224","severity":1,"message":"225","line":22,"column":78,"nodeType":"226","endLine":22,"endColumn":97,"suggestions":"228"},{"ruleId":"224","severity":1,"message":"225","line":30,"column":78,"nodeType":"226","endLine":30,"endColumn":97,"suggestions":"229"},{"ruleId":"230","severity":1,"message":"231","line":9,"column":14,"nodeType":"214","messageId":"232","endLine":9,"endColumn":30},{"ruleId":"212","severity":1,"message":"233","line":9,"column":51,"nodeType":"214","messageId":"215","endLine":9,"endColumn":67},{"ruleId":"212","severity":1,"message":"234","line":1,"column":57,"nodeType":"214","messageId":"215","endLine":1,"endColumn":74},{"ruleId":"224","severity":1,"message":"235","line":16,"column":6,"nodeType":"226","endLine":16,"endColumn":13,"suggestions":"236"},{"ruleId":"212","severity":1,"message":"237","line":5,"column":10,"nodeType":"214","messageId":"215","endLine":5,"endColumn":21},"no-native-reassign",["238"],"no-negated-in-lhs",["239"],"@typescript-eslint/no-unused-vars","'search' is assigned a value but never used.","Identifier","unusedVar","'pageSize' is assigned a value but never used.",["238"],["239"],["238"],["239"],"'isError' is assigned a value but never used.","'isLoading' is assigned a value but never used.","'covidCaes' is assigned a value but never used.","react-hooks/exhaustive-deps","React Hook React.useMemo has a missing dependency: 'info'. Either include it or remove the dependency array.","ArrayExpression",["240"],["241"],["242"],"@typescript-eslint/no-redeclare","'ButtonToNavigate' is already defined.","redeclared","'ButtonToNavigate' is assigned a value but never used.","'PropsWithChildren' is defined but never used.","React Hook useEffect has a missing dependency: 'setFilter'. Either include it or remove the dependency array. If 'setFilter' changes too often, find the parent component that defines it and wrap that definition in useCallback.",["243"],"'CountryData' is defined but never used.","no-global-assign","no-unsafe-negation",{"desc":"244","fix":"245"},{"desc":"244","fix":"246"},{"desc":"244","fix":"247"},{"desc":"248","fix":"249"},"Update the dependencies array to be: [info]",{"range":"250","text":"251"},{"range":"252","text":"251"},{"range":"253","text":"251"},"Update the dependencies array to be: [setFilter, state]",{"range":"254","text":"255"},[360,379],"[info]",[612,631],[862,881],[431,438],"[setFilter, state]"]