dev #1
|
@ -202,3 +202,4 @@ body {
|
|||
max-width: 300px;
|
||||
}
|
||||
}
|
||||
|
|
@ -19,8 +19,11 @@ const CharacterDetails = () => {
|
|||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
|
||||
.finally(() => {
|
||||
rishabh
commented
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}
|
||||
|
|
|
@ -123,7 +123,6 @@ const Home = () => {
|
|||
</div>
|
||||
|
||||
<CharacterCard data={filteredData} />
|
||||
|
||||
{showSkeleton && hasMore && (
|
||||
<ul className="skeleton-character-container">
|
||||
{[...Array.from({ length: 5 })].map((_, index) => (
|
||||
|
|
Loading…
Reference in a new issue
Add .finally statement for stop the loading