Skip to content

Commit 9a18a8b

Browse files
committed
fix(web): remove center flag and make it default behavior
1 parent a94f319 commit 9a18a8b

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

web/src/app.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,55 +36,55 @@ const App: React.FC = () => {
3636
<Route
3737
index
3838
element={
39-
<Suspense fallback={<Loader width={"48px"} height={"48px"} center />}>
39+
<Suspense fallback={<Loader width={"48px"} height={"48px"} />}>
4040
<Home />
4141
</Suspense>
4242
}
4343
/>
4444
<Route
4545
path="cases/*"
4646
element={
47-
<Suspense fallback={<Loader width={"48px"} height={"48px"} center />}>
47+
<Suspense fallback={<Loader width={"48px"} height={"48px"} />}>
4848
<Cases />
4949
</Suspense>
5050
}
5151
/>
5252
<Route
5353
path="courts/*"
5454
element={
55-
<Suspense fallback={<Loader width={"48px"} height={"48px"} center />}>
55+
<Suspense fallback={<Loader width={"48px"} height={"48px"} />}>
5656
<Courts />
5757
</Suspense>
5858
}
5959
/>
6060
<Route
6161
path="dashboard/:page/:order/:filter"
6262
element={
63-
<Suspense fallback={<Loader width={"48px"} height={"48px"} center />}>
63+
<Suspense fallback={<Loader width={"48px"} height={"48px"} />}>
6464
<Dashboard />
6565
</Suspense>
6666
}
6767
/>
6868
<Route
6969
path="dispute-template"
7070
element={
71-
<Suspense fallback={<Loader width={"48px"} height={"48px"} center />}>
71+
<Suspense fallback={<Loader width={"48px"} height={"48px"} />}>
7272
<DisputeTemplateView />
7373
</Suspense>
7474
}
7575
/>
7676
<Route
7777
path="resolver/*"
7878
element={
79-
<Suspense fallback={<Loader width={"48px"} height={"48px"} center />}>
79+
<Suspense fallback={<Loader width={"48px"} height={"48px"} />}>
8080
<DisputeResolver />
8181
</Suspense>
8282
}
8383
/>
8484
<Route
8585
path="get-pnk/*"
8686
element={
87-
<Suspense fallback={<Loader width={"48px"} height={"48px"} center />}>
87+
<Suspense fallback={<Loader width={"48px"} height={"48px"} />}>
8888
<GetPnk />
8989
</Suspense>
9090
}

web/src/components/Loader.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,21 @@ const StyledKlerosIcon = styled(KlerosIcon)`
2727
animation: ${breathing} 2s ease-out infinite normal;
2828
`;
2929

30-
const Container = styled.div<{ width?: Width; height?: Height; center?: boolean }>`
30+
const Container = styled.div<{ width?: Width; height?: Height }>`
31+
margin: auto;
3132
width: ${({ width }) => width ?? "100%"};
3233
height: ${({ height }) => height ?? "100%"};
33-
margin: ${({ center }) => center ? "auto" : "initial"};
3434
`;
3535

3636
interface ILoader {
3737
width?: Width;
3838
height?: Height;
39-
center?: boolean;
4039
className?: string;
4140
}
4241

43-
const Loader: React.FC<ILoader> = ({ width, height, center, className }) => {
42+
const Loader: React.FC<ILoader> = ({ width, height, className }) => {
4443
return (
45-
<Container {...{ width, height, center, className }}>
44+
<Container {...{ width, height, className }}>
4645
<StyledKlerosIcon />
4746
</Container>
4847
);

0 commit comments

Comments
 (0)