Skip to content

Commit

Permalink
apply BoxLoader on MainPage #66
Browse files Browse the repository at this point in the history
  • Loading branch information
Seogeurim committed Mar 4, 2021
1 parent 6e95bb0 commit 3ffdd0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Components/Loader/Box/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
position: relative;
border: 3px solid;
display: inline-block;
animation: rect-rotate 2s linear infinite;
animation: rect-rotate 1.5s linear infinite;
}

.boxLoader::after {
Expand All @@ -21,7 +21,7 @@
display: block;
background: $main-color;
opacity: 0.5;
animation: fill-rect 2s linear infinite;
animation: fill-rect 1.5s linear infinite;
}

@keyframes rect-rotate {
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/MainPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getMainPosts } from 'Redux/fetch-post';

import NavBar from 'Components/Common/NavBar';
import Jumbotron from 'Components/Common/Jumbotron';
import Loader from 'Components/Common/Loader';
import BoxLoader from 'Components/Loader/Box';
import Post from 'Components/Post/Post';
import PostList from 'Components/Post/PostList';
import MixButton from 'Components/Post/PostButton/MixButton';
Expand Down Expand Up @@ -61,7 +61,7 @@ function MainPage() {
<NavBar isActive="main" />
<Jumbotron title="Find out" description="What other people painted" />
<MixChecker />
<PostList posts={!loading ? renderPosts() : <Loader />} />
<PostList posts={!loading ? renderPosts() : <BoxLoader />} />
</div>
);
}
Expand Down

0 comments on commit 3ffdd0e

Please sign in to comment.