Skip to content

Commit

Permalink
added refresh button placeholder (#436)
Browse files Browse the repository at this point in the history
* added refresh button placeholder

* added alt tag spinner
  • Loading branch information
omthakare16 authored Oct 2, 2022
1 parent 2ab5c7b commit e435386
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { randomPetsList } from "../../routes/API";
import { fetcher } from "../../utils/homePageFetcher";
import LoadPlaceHolder from "../shared/PlaceHolderCard";
import "./home.css";
import load from "./loding.png";

export default function Home() {
return (
Expand Down Expand Up @@ -54,6 +55,9 @@ const LoadingPetCards = () => {
<LoadPlaceHolder />
<LoadPlaceHolder />
</PetCardFlex>{" "}
<Button color="primary">
<img className="rotate" src={load} alt="spinner" />
</Button>
</PawHubContainer>
);
if (error || !petList)
Expand Down
12 changes: 12 additions & 0 deletions src/components/home/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,15 @@
.home__background {
background: url("./homehero.png");
}
.rotate {
animation: rotation 1.3s infinite linear;
}

@keyframes rotation {
from {
transform: rotate(0deg);
}
to {
transform: rotate(359deg);
}
}
Binary file added src/components/home/loding.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e435386

Please sign in to comment.