diff --git a/components/Fieldset/index.tsx b/components/Fieldset/index.tsx index f1095946..944f4694 100644 --- a/components/Fieldset/index.tsx +++ b/components/Fieldset/index.tsx @@ -9,9 +9,9 @@ interface Props { onChange?: (event: React.ChangeEvent) => void } -const Fieldset = React.forwardRef((props, ref) => { +const Fieldset = (props: Props) => { const fieldType = (['password', 'confirm_password'].includes(props.fieldName)) ? 'password' : 'text' - + return (
((props, ref) => { }
) -}) +} export default Fieldset \ No newline at end of file diff --git a/components/GridRep/index.tsx b/components/GridRep/index.tsx index 7851731f..0dda8542 100644 --- a/components/GridRep/index.tsx +++ b/components/GridRep/index.tsx @@ -2,9 +2,6 @@ import React, { useEffect, useState } from 'react' import './index.scss' -import mainhandImages from '../../images/weapon-main/*.jpg' -import gridImages from '../../images/weapon-grid/*.jpg' - interface Props { shortcode: string grid: GridWeapon[] @@ -18,10 +15,6 @@ const GridRep = (props: Props) => { const [weapons, setWeapons] = useState>({}) useEffect(() => { - configure() - }, []) - - function configure() { const newWeapons = Array(numWeapons) for (const [key, value] of Object.entries(props.grid)) { @@ -32,7 +25,7 @@ const GridRep = (props: Props) => { } setWeapons(newWeapons) - } + }, [props.grid]) function navigate() { props.onClick(props.shortcode) diff --git a/components/Header/index.tsx b/components/Header/index.tsx index a69185e8..39220a86 100644 --- a/components/Header/index.tsx +++ b/components/Header/index.tsx @@ -25,7 +25,7 @@ const Header = (props: Props) => { setUsername(cookies.user.username) console.log(`Logged in as user "${cookies.user.username}"`) } - }, []) + }, [cookies]) function copyToClipboard() { const el = document.createElement('input') diff --git a/components/UncapStar/index.tsx b/components/UncapStar/index.tsx index b8a0c99b..6cc0d45e 100644 --- a/components/UncapStar/index.tsx +++ b/components/UncapStar/index.tsx @@ -14,7 +14,7 @@ const UncapStar = (props: Props) => { }) return ( -
  • +
  • ) }