hotfix/ loading and ID

This commit is contained in:
bhavnisharora 2025-01-02 16:21:24 +05:30
parent 4d883d27e1
commit 014ca376a8
3 changed files with 9 additions and 6 deletions

View file

@ -202,3 +202,4 @@ body {
max-width: 300px;
}
}

View file

@ -19,8 +19,11 @@ const CharacterDetails = () => {
})
.catch((err) => {
console.log(err);
})
.finally(() => {
setLoading(false);
});
}, []);
}, [id]);
if (loading) {
return <p> loading...</p>;

View file

@ -123,7 +123,6 @@ const Home = () => {
</div>
<CharacterCard data={filteredData} />
{showSkeleton && hasMore && (
<ul className="skeleton-character-container">
{[...Array.from({ length: 5 })].map((_, index) => (