Removing console logs

This commit is contained in:
Jamie Hewitt 2022-10-17 15:36:37 +03:00
parent e3749b7c71
commit 9a753b7d25

View File

@ -6,17 +6,16 @@ import { getData, getNetworkSUmmary, getSummary } from '../utils/getData'
export default function HomePage(): ReactElement { export default function HomePage(): ReactElement {
const [network, setNetwork] = useState<string>('mainnet') const [network, setNetwork] = useState<string>('mainnet')
const [statuses, setStatuses] = useState<Status[]>()
const [summary, setSummary] = useState<Summary[]>() const [summary, setSummary] = useState<Summary[]>()
const [networks, setNetworks] = useState<NetworkSummary[]>() const [networks, setNetworks] = useState<NetworkSummary[]>()
function statusIcon(state: State): string { function statusIcon(state: State): string {
if (state === State.Up) { if (state === State.Up) {
return '✅' return '✅'
} else if (state === State.Warning) {
return '🚧'
} else if (state === State.Down) { } else if (state === State.Down) {
return '🚨' return '🚨'
} else {
return '🚧'
} }
} }
@ -39,7 +38,6 @@ export default function HomePage(): ReactElement {
useEffect(() => { useEffect(() => {
async function getStatuses() { async function getStatuses() {
const statusData = await getData() const statusData = await getData()
if (statusData) setStatuses(statusData)
const summaryData = getSummary(network, statusData) const summaryData = getSummary(network, statusData)
if (summaryData) setSummary(summaryData) if (summaryData) setSummary(summaryData)
const networkSummary = getNetworkSUmmary(statusData) const networkSummary = getNetworkSUmmary(statusData)