Fixed Type Errors and Replaced Most Cases of ElementRef with Modern Alternitives

This commit is contained in:
Ahmad 2024-05-29 17:59:57 -04:00
parent b44c2e0f6e
commit e29f7bf253
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
11 changed files with 45 additions and 1958 deletions

View file

@ -1,6 +1,6 @@
import { X } from 'lucide-react';
import { toast } from 'sonner';
import { ElementRef, useRef } from 'react';
import { useRef } from 'react';
import Link from 'next/link';
import { Button } from '@/components/ui/button';
@ -20,7 +20,7 @@ interface BoardUpdateImageProps {
}
export const BoardUpdateImage = ({ boardId }: BoardUpdateImageProps) => {
const closeRef = useRef<ElementRef<'button'>>(null);
const closeRef = useRef<HTMLButtonElement>(null);
const { execute, fieldErrors } = useAction(updateBoard, {
onSuccess: (data) => {