MutableRefObject is deprecated (all refs are mutable now)

This commit is contained in:
Manav Rathi
2025-01-03 15:16:50 +05:30
parent b5418ea2e4
commit cf93f80c0c
2 changed files with 5 additions and 5 deletions

View File

@@ -697,7 +697,7 @@ const AlbumCollectionOptions: React.FC<AlbumCollectionOptionsProps> = ({
interface CollectionSortOrderMenuProps { interface CollectionSortOrderMenuProps {
open: boolean; open: boolean;
onClose: () => void; onClose: () => void;
overFlowMenuIconRef: React.MutableRefObject<SVGSVGElement>; overFlowMenuIconRef: React.RefObject<SVGSVGElement>;
onAscClick: () => void; onAscClick: () => void;
onDescClick: () => void; onDescClick: () => void;
} }

View File

@@ -50,8 +50,8 @@ import React, {
useEffect, useEffect,
useRef, useRef,
useState, useState,
type MutableRefObject,
type Ref, type Ref,
type RefObject,
} from "react"; } from "react";
import uploadManager from "services/upload/uploadManager"; import uploadManager from "services/upload/uploadManager";
@@ -791,8 +791,8 @@ const canvasToFile = async (
}; };
interface CommonMenuProps { interface CommonMenuProps {
canvasRef: MutableRefObject<HTMLCanvasElement>; canvasRef: RefObject<HTMLCanvasElement>;
originalSizeCanvasRef: MutableRefObject<HTMLCanvasElement>; originalSizeCanvasRef: RefObject<HTMLCanvasElement>;
setTransformationPerformed: (v: boolean) => void; setTransformationPerformed: (v: boolean) => void;
canvasLoading: boolean; canvasLoading: boolean;
setCanvasLoading: (v: boolean) => void; setCanvasLoading: (v: boolean) => void;
@@ -802,7 +802,7 @@ interface CommonMenuProps {
type CropMenuProps = CommonMenuProps & { type CropMenuProps = CommonMenuProps & {
previewScale: number; previewScale: number;
cropBoxProps: CropBoxProps; cropBoxProps: CropBoxProps;
cropBoxRef: MutableRefObject<HTMLDivElement>; cropBoxRef: RefObject<HTMLDivElement>;
resetCropBox: () => void; resetCropBox: () => void;
}; };