Remove dead ref code
This commit is contained in:
parent
725e989bd7
commit
97f22b852a
1 changed files with 0 additions and 7 deletions
|
|
@ -28,8 +28,6 @@ const JobSection = (props: Props) => {
|
||||||
const [numSkills, setNumSkills] = useState(4)
|
const [numSkills, setNumSkills] = useState(4)
|
||||||
const [skills, setSkills] = useState<JobSkill[]>([])
|
const [skills, setSkills] = useState<JobSkill[]>([])
|
||||||
|
|
||||||
const [skillRefs, setSkillRefs] = useState<ForwardedRef<HTMLDivElement>[]>([])
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Set current job based on ID
|
// Set current job based on ID
|
||||||
if (party.job) setJob(party.job)
|
if (party.job) setJob(party.job)
|
||||||
|
|
@ -43,10 +41,6 @@ const JobSection = (props: Props) => {
|
||||||
if (job) appState.party.job = job
|
if (job) appState.party.job = job
|
||||||
}, [job])
|
}, [job])
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setSkillRefs(Array(numSkills).fill(React.createRef<HTMLDivElement>()))
|
|
||||||
}, [numSkills])
|
|
||||||
|
|
||||||
function receiveJob(job?: Job) {
|
function receiveJob(job?: Job) {
|
||||||
console.log(`Receiving job! Row ${job?.row}: ${job?.name.en}`)
|
console.log(`Receiving job! Row ${job?.row}: ${job?.name.en}`)
|
||||||
if (job) {
|
if (job) {
|
||||||
|
|
@ -83,7 +77,6 @@ const JobSection = (props: Props) => {
|
||||||
editable={!skills[index]?.main && editable}
|
editable={!skills[index]?.main && editable}
|
||||||
key={`skill-${index}`}
|
key={`skill-${index}`}
|
||||||
hasJob={job != undefined && job.id != "-1"}
|
hasJob={job != undefined && job.id != "-1"}
|
||||||
ref={skillRefs[index]}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue