Huthaifa-Dev / project

Found unused variables in TypeScript code JS-0356
Performance
Major
a month ago2 years old
'edittingID' is assigned a value but never used
 30  const products = useSelector(selectProducts);
 31  const [filteredData, setFilteredData] = useState<Product[]>(products);
 32  const [form, setForm] = React.useState<boolean>(false);
 33  const [edittingID, setEdittingID] = React.useState<string>(""); 34  const [deletingID, setDeletingID] = React.useState<string>("");
 35  const {
 36    register,
'field' is defined but never used
215                  control={control}
216                  name="code"
217                  defaultValue={getValues("code")}
218                  render={({ field }) => (219                    <InputMask
220                      mask="aaaa-aaaa-9999"
221                      {...register("code", {
'snapshot' is defined but never used
 83      }
 84
 85      const storageRef = ref(storage, "images/" + getValues("image")[0].name);
 86      uploadBytes(storageRef, getValues("image")[0]).then((snapshot) => { 87        getDownloadURL(storageRef).then((url) => {
 88          const product: Partial<Product> = {
 89            ...data,
'list' is defined but never used
 29  uploadBytes,
 30  getDownloadURL,
 31  listAll,
 32  list, 33} from "firebase/storage";
 34import { storage } from "../../firebase";
 35const defaultValues = {
'listAll' is defined but never used
 28  ref,
 29  uploadBytes,
 30  getDownloadURL,
 31  listAll, 32  list,
 33} from "firebase/storage";
 34import { storage } from "../../firebase";