Skip to content

Commit

Permalink
add loading
Browse files Browse the repository at this point in the history
  • Loading branch information
wendychaung committed Oct 10, 2024
1 parent 40a141f commit 374a752
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/loading.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Spinner from 'react-bootstrap/Spinner';
import styled from "styled-components";

const Box = styled.div`
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
position:fixed;
background: rgba(0,0,0,0.3);
left: 0;
top: 0;
z-index: 99;
backdrop-filter: blur(3px);
`

export default function Loading() {
return <Box>
<Spinner animation="border" role="status" variant="primary" size="lg" />
</Box>
}
5 changes: 5 additions & 0 deletions src/views/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import styled from "styled-components";

import {Card,Button } from "react-bootstrap";
import {nftStorageUploader} from "../utils/nftStorageUploader.js";
import Loading from "../loading.jsx";

const { TextArea } = Input;

Expand Down Expand Up @@ -277,6 +278,10 @@ export default function Home({cluster}) {

return (
<FlexBox>
{
loading && <Loading />
}

<Steps
current={step}
status={step >= 0 ? stepStatus[step] : "process"}
Expand Down

0 comments on commit 374a752

Please sign in to comment.