dev #1

Merged
rishabh merged 7 commits from dev into main 2025-01-02 12:46:37 +00:00
3 changed files with 9 additions and 6 deletions
Showing only changes of commit 014ca376a8 - Show all commits

View file

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

View file

@ -19,8 +19,11 @@ const CharacterDetails = () => {
})
.catch((err) => {
console.log(err);
})

Add .finally statement for stop the loading

Add .finally statement for stop the loading
.finally(() => {

id need to be in dependancy array

id need to be in dependancy array
setLoading(false);
});
}, []);
}, [id]);
if (loading) {
return <p> loading...</p>;
@ -50,7 +53,7 @@ const CharacterDetails = () => {
<strong>Skin Color </strong> {character.skin_color}
</p>
<p>
<strong>Eye Color </strong> {character.eye_color}
<strong>Eye Color </strong> {character.eye_color}
</p>
<p>
<strong>Birth Year </strong> {character.birth_year}

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) => (