Preview:
 const handleOnInputChange = (reason?: string, id?: string | null) => {
    if (!id) {
      setPreviewUrl(null);
      setValue("type", 2);
      reset({ type: 2 });
      if (feeType === FeeType.sameFees) {
        const editCourtValueReset: FormProps = {
          ...getAllValues,
          name: "",
          gameId: "",
          courtId: "",
          midNight: "",
          morning: "",
          evening: "",
          night: "",
          image: "",
        };
        // setValue("midNight", "");
        // setValue("morning", "");
        // setValue("evening", "");
        // setValue("night", "");
        // setValue("courtId", "");

        reset(editCourtValueReset);
      } else {
        setValue("type", 2);
        const dayWiseValues = {
          ...getAllValues,
          name: "",
          // gameId: "",
          // courtId: "",
          midNight: "",
          morning: "",
          evening: "",
          night: "",
          image: "",
          // fees: DAYWISE_FEE,
          type: 2,
        };
        setFeeType(2);
        setDayWiseFeesData(DAYWISE_FEE);
        reset(dayWiseValues);
      }
    }
  };
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter