-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add loader spinner on initial data rendering
- Loading branch information
1 parent
2c68ba6
commit 693e3a0
Showing
10 changed files
with
96 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Oval } from "react-loader-spinner" | ||
|
||
export default function LoaderSpinner() { | ||
return ( | ||
<div className="loader-spinner"> | ||
<Oval | ||
height={100} | ||
width={100} | ||
color="#dd4ec6" | ||
wrapperStyle={{}} | ||
wrapperClass="" | ||
visible={true} | ||
ariaLabel="oval-loading" | ||
secondaryColor="#8d4fc9" | ||
strokeWidth={2} | ||
strokeWidthSecondary={2} | ||
/> | ||
<p>Cargando Parches Chat...</p> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.loader-spinner { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
gap: 10px; | ||
align-items: center; | ||
width: 100%; | ||
height: 100vh; | ||
background-color: black; | ||
position: absolute; | ||
z-index: 100; | ||
color: white; | ||
font-size: 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { createSlice } from "@reduxjs/toolkit" | ||
|
||
interface loader { | ||
status: boolean | ||
} | ||
|
||
const initialState: loader = { | ||
status: false | ||
} | ||
|
||
export const loaderSpinnerSlice = createSlice({ | ||
name: "loader", | ||
initialState, | ||
reducers: { | ||
startLoaderSpinner: state => { | ||
state.status = true | ||
}, | ||
stopLoaderSpinner: state => { | ||
state.status = false | ||
} | ||
} | ||
}) | ||
|
||
export const { startLoaderSpinner, stopLoaderSpinner } = loaderSpinnerSlice.actions | ||
|
||
export default loaderSpinnerSlice.reducer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters