chore: remove unnecessary useEffect for setting default image (#6566)
This commit is contained in:
parent
7a6b50a6e1
commit
2b595cfe62
1 changed files with 1 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
|||
"use client";
|
||||
|
||||
import React, { useEffect, useState, useRef, useCallback } from "react";
|
||||
import React, { useState, useRef, useCallback } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import Image from "next/image";
|
||||
import { useParams } from "next/navigation";
|
||||
|
|
@ -130,12 +130,6 @@ export const ImagePickerPopover: React.FC<Props> = observer((props) => {
|
|||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!unsplashImages || value !== null) return;
|
||||
|
||||
onChange(unsplashImages[0]?.urls.regular);
|
||||
}, [value, onChange, unsplashImages]);
|
||||
|
||||
const handleClose = () => {
|
||||
if (isOpen) setIsOpen(false);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue