Skip to content

Commit

Permalink
fix: type warn
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Jul 17, 2022
1 parent bd29643 commit 23f0f0f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions GZCTF/ClientApp/src/components/TeamCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ const TeamCard: FC<TeamCardProps> = (props) => {
}
};

const ref = useRef();
const ref = useRef<HTMLDivElement | null>(null);
const [cardSzY, setCardSzY] = useState('180px');

useEffect(() => {
setCardSzY(window.getComputedStyle(ref.current).getPropertyValue('height'));
setCardSzY(window.getComputedStyle(ref.current!).getPropertyValue('height'));
}, []);

return (
Expand Down

0 comments on commit 23f0f0f

Please sign in to comment.