Clean up EnteSpinner
This commit is contained in:
parent
ac01f7a12a
commit
5867af3a2f
4 changed files with 10 additions and 8 deletions
|
@ -1,10 +1,10 @@
|
|||
import * as React from "react";
|
||||
import { Spinner } from "react-bootstrap";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export default function EnteSpinner(props: any) {
|
||||
export const EnteSpinner: React.FC = () => {
|
||||
return (
|
||||
<Spinner {...props} animation="border" variant="success" role="status">
|
||||
<Spinner animation="border" variant="success" role="status">
|
||||
<span className="sr-only">Loading...</span>
|
||||
</Spinner>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -14,4 +14,5 @@ function MyApp({ Component, pageProps }: AppProps) {
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default MyApp;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Container } from "components/Container";
|
||||
import EnteSpinner from "components/EnteSpinner";
|
||||
import { EnteSpinner } from "components/EnteSpinner";
|
||||
import * as React from "react";
|
||||
|
||||
export default function DesktopRedirect() {
|
||||
|
@ -12,7 +12,7 @@ export default function DesktopRedirect() {
|
|||
|
||||
return (
|
||||
<Container>
|
||||
<EnteSpinner animation="border" />
|
||||
<EnteSpinner />
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Container } from "components/Container";
|
||||
import EnteSpinner from "components/EnteSpinner";
|
||||
import { EnteSpinner } from "components/EnteSpinner";
|
||||
import * as React from "react";
|
||||
import { parseAndHandleRequest } from "services/billingService";
|
||||
import { CUSTOM_ERROR } from "utils/error";
|
||||
|
@ -8,6 +8,7 @@ import constants from "utils/strings";
|
|||
export default function Home() {
|
||||
const [errorMessageView, setErrorMessageView] = React.useState(false);
|
||||
const [loading, setLoading] = React.useState(false);
|
||||
|
||||
React.useEffect(() => {
|
||||
async function main() {
|
||||
try {
|
||||
|
@ -34,7 +35,7 @@ export default function Home() {
|
|||
{errorMessageView ? (
|
||||
<div>{constants.SOMETHING_WENT_WRONG}</div>
|
||||
) : (
|
||||
loading && <EnteSpinner animation="border" />
|
||||
loading && <EnteSpinner />
|
||||
)}
|
||||
</Container>
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue