79585013

Date: 2025-04-21 17:15:42
Score: 1
Natty:
Report link

You're almost there, just a small bug in your filter logic.

You're doing:

setSites(sites.filter((site, i) => index !== site[i]));

But site[i] doesn't make sense. You probably meant:

setSites(sites.filter((_, i) => i !== index));
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Chitranshu Sanket