diff --git a/src/pages/CustomHooks/use-fetch/test.jsx b/src/pages/CustomHooks/use-fetch/test.jsx index 43b3910..cf99d84 100644 --- a/src/pages/CustomHooks/use-fetch/test.jsx +++ b/src/pages/CustomHooks/use-fetch/test.jsx @@ -13,7 +13,9 @@ const UseFetchHookTest = () => { useFetch Hook {pending ? ( - +
+ +
) : error ? (

{error}

) : data && data.products && data.products.length ? ( diff --git a/src/pages/GithubProfileFinder/GithubProfileFinder.jsx b/src/pages/GithubProfileFinder/GithubProfileFinder.jsx index 1d31e9f..52a4c4a 100644 --- a/src/pages/GithubProfileFinder/GithubProfileFinder.jsx +++ b/src/pages/GithubProfileFinder/GithubProfileFinder.jsx @@ -59,7 +59,9 @@ const GithubProfileFinder = () => { {loading ? ( - +
+ +
) : userData !== null ? (
diff --git a/src/pages/ImageSlider.jsx b/src/pages/ImageSlider.jsx index 484bbf0..e754050 100644 --- a/src/pages/ImageSlider.jsx +++ b/src/pages/ImageSlider.jsx @@ -1,6 +1,7 @@ import { useEffect, useState } from "react"; import PropTypes from "prop-types"; import { BsArrowLeftCircleFill, BsArrowRightCircleFill } from "react-icons/bs"; +import Loading from "@/components/ui/Loading"; function ImageSlider({ url = "https://meme-api.com/gimme", @@ -34,7 +35,7 @@ function ImageSlider({ }, [url]); if (loading) { - return
Loading data ! please wait
; + return
; } if (errorMsg !== null) { return
Error occured ! {errorMsg}
; diff --git a/src/pages/LoadMoreData.jsx b/src/pages/LoadMoreData.jsx index 471d4ac..912154c 100644 --- a/src/pages/LoadMoreData.jsx +++ b/src/pages/LoadMoreData.jsx @@ -35,7 +35,7 @@ function LoadMoreData() { }, [products]); if (loading) { - return + return
} console.log(products); diff --git a/src/pages/SearchAutoComplete/SearchAutoComplete.jsx b/src/pages/SearchAutoComplete/SearchAutoComplete.jsx index ffcca80..918142f 100644 --- a/src/pages/SearchAutoComplete/SearchAutoComplete.jsx +++ b/src/pages/SearchAutoComplete/SearchAutoComplete.jsx @@ -80,7 +80,9 @@ const SearchAutoComplete = () => { placeholder="Search Users Here..." /> {loading ? ( - +
+ +
) : ( showDropDown && (