Maybe hopefully fixed infinite loading??

This commit is contained in:
Liam 2022-10-19 18:10:58 +01:00
parent 994747cf7f
commit 0ae77ecbf7
2 changed files with 11 additions and 5 deletions

@ -1,4 +1,4 @@
import { createTheme, NextUIProvider } from "@nextui-org/react";
import { createTheme, Image, NextUIProvider } from "@nextui-org/react";
import { NextSeo } from "next-seo";
import { ThemeProvider as NextThemesProvider } from "next-themes";
import Head from "next/head";
@ -61,10 +61,13 @@ function MyApp({ Component, pageProps }) {
/>
<noscript>
<img src="https://analytics.fascinated.cc/ingress/4bc413fa-a126-4860-9a6a-22d10d5cf2fb/pixel.gif" />
<Image
alt="For page analytics"
src="https://analytics.fascinated.cc/ingress/4bc413fa-a126-4860-9a6a-22d10d5cf2fb/pixel.gif"
/>
</noscript>
<script
defer
defer={true}
src="https://analytics.fascinated.cc/ingress/4bc413fa-a126-4860-9a6a-22d10d5cf2fb/script.js"
></script>
</Head>

@ -8,6 +8,7 @@ import {
Modal,
Radio,
Spacer,
Spinner,
Switch,
Text,
} from "@nextui-org/react";
@ -64,7 +65,7 @@ export default class Home extends Component {
let values = {};
Object.entries(json.values).forEach((value) => {
if (value[0] !== undefined) {
values[value[0]] = value[1];
values[value[0]] = value[1];
}
});
@ -142,7 +143,9 @@ export default class Home extends Component {
render() {
return this.state.loading ? (
<h1>Loading...</h1>
<div className={styles.loading}>
<Spinner size={"xl"}></Spinner>
</div>
) : (
<div className={styles.main}>
<NavBar avatarUrl={this.state.avatarUrl}></NavBar>