Skip to content

Commit d12a3cc

Browse files
Sean PrashadSean Prashad
Sean Prashad
authored and
Sean Prashad
committed
Update react-scripts from 3.4.4 to 4.0.0
Ejected the create-react-app and fixed 2 security vulnerabilities
1 parent 11c1f9e commit d12a3cc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+12203
-8194
lines changed

package-lock.json

+12,187-8,183
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"react-ga": "^2.7.0",
1919
"react-icons": "^3.11.0",
2020
"react-markdown": "^4.3.1",
21-
"react-scripts": "^3.4.4",
21+
"react-scripts": "4.0.0",
2222
"react-scroll": "^1.8.0",
2323
"react-table": "^7.6.3",
2424
"react-test-renderer": "^16.14.0",
@@ -28,7 +28,7 @@
2828
},
2929
"devDependencies": {
3030
"babel-eslint": "^10.0.3",
31-
"eslint": "^6.8.0",
31+
"eslint": "^7.11.0",
3232
"eslint-config-airbnb": "^18.2.1",
3333
"eslint-config-prettier": "^6.15.0",
3434
"eslint-plugin-import": "^2.22.1",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/components/Acknowledgements/index.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ import {
1212
}from'reactstrap';
1313
import{Event}from'../Shared/Tracking';
1414

15-
importBlindfrom'../../images/Blind.png';
16-
importEducativefrom'../../images/Educative.png';
17-
importHackernoonfrom'../../images/Hackernoon.png';
18-
1915
import'./styles.scss';
2016

17+
constimagePath=`${process.env.PUBLIC_URL}/assets/images/`;
18+
constBlind=`${imagePath}Blind.png`;
19+
constEducative=`${imagePath}Educative.png`;
20+
constHackernoon=`${imagePath}Hackernoon.png`;
21+
2122
constAcknowledgements=()=>{
2223
return(
2324
<ContainerclassName="acknowledgements">

src/components/Table/filters.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function CreateDropDownListHelper(options, filterValue, setFilter) {
1010
>
1111
<optionvalue="">All</option>
1212
{options.map((option,idx)=>(
13-
<optionkey={idx}value={option}>
13+
<optionkey={`${idx+option}`}value={option}>
1414
{option}
1515
</option>
1616
))}
@@ -19,8 +19,10 @@ function CreateDropDownListHelper(options, filterValue, setFilter) {
1919
}
2020

2121
exportfunctionDefaultColumnFilter({
22-
column: { filterValue, preFilteredRows, setFilter, id },
22+
// eslint-disable-next-line react/prop-types
23+
column: { filterValue, preFilteredRows, setFilter },
2324
}){
25+
// eslint-disable-next-line react/prop-types
2426
constcount=preFilteredRows.length;
2527

2628
return(

src/components/Table/index.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable react/jsx-props-no-spreading */
12
importReact,{useState,useEffect}from'react';
23
import{
34
TableasReactTable,
@@ -22,7 +23,7 @@ import questions from '../../data';
2223
import'react-toggle/style.css';
2324
import'./styles.scss';
2425

25-
constimages=require.context('../../icons',true);
26+
consticonPath=`${process.env.PUBLIC_URL}/assets/icons/`;
2627

2728
constTable=()=>{
2829
constdata=React.useMemo(()=>questions,[]);
@@ -213,6 +214,8 @@ const Table = () => {
213214
{
214215
Header: ()=>{
215216
return(
217+
// eslint-disable-next-line
218+
// eslint-disable-next-line jsx-a11y/label-has-associated-control
216219
<labelhtmlFor="pattern-toggle">
217220
<span>Show/Hide Patterns </span>
218221
<Toggle
@@ -284,11 +287,10 @@ const Table = () => {
284287
accessor: 'companies',
285288
Cell: cellInfo=>{
286289
constcompanies=cellInfo.row.original.companies.map(company=>{
287-
consticon=images(`./${company}.png`);
288290
return(
289291
<img
290292
key={company}
291-
src={icon}
293+
src={`${iconPath}${company}.png`}
292294
alt={company}
293295
data-tip={company}
294296
/>

0 commit comments

Comments
 (0)
close