feat(search-button): add empty check

This commit is contained in:
ItzCrazyKns 2024-09-15 10:16:20 +05:30
parent 1fcd64ad42
commit 40f551c426
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ const SearchImages = ({
const data = await res.json();
const images = data.images;
const images = data.images ?? [];
setImages(images);
setSlides(
images.map((image: Image) => {

View File

@ -64,7 +64,7 @@ const Searchvideos = ({
const data = await res.json();
const videos = data.videos;
const videos = data.videos ?? [];
setVideos(videos);
setSlides(
videos.map((video: Video) => {