From 97f22b852af23c7ae04eeb3a369d6467f89db81e Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Wed, 30 Nov 2022 06:09:32 -0800 Subject: [PATCH] Remove dead ref code --- components/JobSection/index.tsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/components/JobSection/index.tsx b/components/JobSection/index.tsx index 37efada4..90510a2f 100644 --- a/components/JobSection/index.tsx +++ b/components/JobSection/index.tsx @@ -28,8 +28,6 @@ const JobSection = (props: Props) => { const [numSkills, setNumSkills] = useState(4) const [skills, setSkills] = useState([]) - const [skillRefs, setSkillRefs] = useState[]>([]) - useEffect(() => { // Set current job based on ID if (party.job) setJob(party.job) @@ -43,10 +41,6 @@ const JobSection = (props: Props) => { if (job) appState.party.job = job }, [job]) - useEffect(() => { - setSkillRefs(Array(numSkills).fill(React.createRef())) - }, [numSkills]) - function receiveJob(job?: Job) { console.log(`Receiving job! Row ${job?.row}: ${job?.name.en}`) if (job) { @@ -83,7 +77,6 @@ const JobSection = (props: Props) => { editable={!skills[index]?.main && editable} key={`skill-${index}`} hasJob={job != undefined && job.id != "-1"} - ref={skillRefs[index]} /> ) }