File tree Expand file tree Collapse file tree 3 files changed +56
-6
lines changed
Expand file tree Collapse file tree 3 files changed +56
-6
lines changed Original file line number Diff line number Diff line change 1+ import React from "react" ;
2+ import styled , { keyframes } from "styled-components" ;
3+ import KlerosIcon from "svgs/icons/kleros.svg" ;
4+
5+ const Container = styled . div `
6+ position: relative;
7+ flex: 1;
8+ width: 100%;
9+ ` ;
10+
11+ const Wrapper = styled . div `
12+ position: absolute;
13+ width: 20%;
14+ top: 50%;
15+ right: 50%;
16+ transform: translate(50%, -50%);
17+ ` ;
18+
19+ const breathing = keyframes `
20+ 0% {
21+ transform: scale(1);
22+ }
23+
24+ 50% {
25+ transform: scale(1.3);
26+ }
27+
28+ 100% {
29+ transform: scale(1);
30+ }
31+ ` ;
32+
33+ const AnimatedKlerosIcon = styled ( KlerosIcon ) `
34+ animation: ${ breathing } 2s ease-out infinite normal;
35+ margin-bottom: 26px;
36+ ` ;
37+
38+ const Loading : React . FC = ( ) => {
39+ return (
40+ < Container >
41+ < Wrapper >
42+ < AnimatedKlerosIcon />
43+ </ Wrapper >
44+ </ Container >
45+ ) ;
46+ } ;
47+
48+ export default Loading ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import StyledComponentsProvider from "context/StyledComponentsProvider";
1010import RefetchOnBlock from "context/RefetchOnBlock" ;
1111import { NewDisputeProvider } from "./context/NewDisputeContext" ;
1212import Layout from "layout/index" ;
13+ import Loading from "./Loading" ;
1314
1415const Home = lazy ( ( ) => import ( "./pages/Home" ) ) ;
1516const Cases = lazy ( ( ) => import ( "./pages/Cases" ) ) ;
@@ -31,47 +32,47 @@ const App: React.FC = () => {
3132 < Route
3233 index
3334 element = {
34- < Suspense >
35+ < Suspense fallback = { < Loading /> } >
3536 < Home />
3637 </ Suspense >
3738 }
3839 />
3940 < Route
4041 path = "cases/*"
4142 element = {
42- < Suspense >
43+ < Suspense fallback = { < Loading /> } >
4344 < Cases />
4445 </ Suspense >
4546 }
4647 />
4748 < Route
4849 path = "courts/*"
4950 element = {
50- < Suspense >
51+ < Suspense fallback = { < Loading /> } >
5152 < Courts />
5253 </ Suspense >
5354 }
5455 />
5556 < Route
5657 path = "dashboard/:page/:order/:filter"
5758 element = {
58- < Suspense >
59+ < Suspense fallback = { < Loading /> } >
5960 < Dashboard />
6061 </ Suspense >
6162 }
6263 />
6364 < Route
6465 path = "disputeTemplate"
6566 element = {
66- < Suspense >
67+ < Suspense fallback = { < Loading /> } >
6768 < DisputeTemplateView />
6869 </ Suspense >
6970 }
7071 />
7172 < Route
7273 path = "resolver/*"
7374 element = {
74- < Suspense >
75+ < Suspense fallback = { < Loading /> } >
7576 < DisputeResolver />
7677 </ Suspense >
7778 }
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ const StyledToastContainer = styled(ToastContainer)`
2626` ;
2727
2828const OutletContainer = styled . div `
29+ display: flex;
2930 flex: 1;
3031 background-color: ${ ( { theme } ) => theme . lightBackground } ;
3132` ;
You can’t perform that action at this time.
0 commit comments