Browse Source

Fixes

refactor
Hampus Sjöberg 4 years ago
parent
commit
694f8d1cba
  1. 9
      frontend/app.tsx
  2. 6
      frontend/pages/miners.tsx

9
frontend/app.tsx

@ -1,17 +1,22 @@
import React, { ComponentType, useEffect } from "https://esm.sh/react@17.0.2";
import React, { ComponentType, useEffect, useState } from "https://esm.sh/react@17.0.2";
import { StoreProvider } from "https://esm.sh/easy-peasy";
import store, { useStoreActions } from "./state/index.ts";
function StoreStarter({ Page, pageProps }: { Page: ComponentType<any>; pageProps: any }) {
const [gotBlocks, setGotBlocks] = useState(false);
const getBlocks = useStoreActions((store) => store.getBlocks);
useEffect(() => {
(async () => {
await getBlocks();
setGotBlocks(true);
})();
});
}, []);
if (!gotBlocks) {
return null;
}
return <Page {...pageProps} />;
}

6
frontend/pages/miners.tsx

@ -15,7 +15,7 @@ const Table = styled.table`
box-shadow: #000 3px 3px 14px;
border-radius: 6px;
margin: auto;
margin: 0 auto 100px;
border: 0;
border-collapse: collapse;
border-radius: 8px;
@ -120,10 +120,6 @@ export default function Miners() {
</TableRow>
);
})}
<TableRow>
<Cell>AntMiner</Cell>
<SignallingCell>🚫</SignallingCell>
</TableRow>
</TableBody>
</Table>
</Content>

Loading…
Cancel
Save