From b36d3b025fa43c498118c1715ae30f24baf0313f Mon Sep 17 00:00:00 2001 From: Sun Hyuk Ahn Date: Wed, 17 May 2023 18:38:02 -0700 Subject: [PATCH] fix: center loading box --- src/pages/ChartsPage/StatPage.tsx | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/pages/ChartsPage/StatPage.tsx b/src/pages/ChartsPage/StatPage.tsx index 39fa048..6402148 100644 --- a/src/pages/ChartsPage/StatPage.tsx +++ b/src/pages/ChartsPage/StatPage.tsx @@ -1,7 +1,5 @@ -import React, {useEffect, useState} from 'react' import {Box, Heading, Spinner, Text} from "grommet"; import {BaseContainer, BasePage} from "../../components/ui"; -import {MetricsDailyItem} from "../../types"; import styled from "styled-components"; import {Link} from "react-router-dom"; import {useMediaQuery} from "react-responsive"; @@ -13,10 +11,6 @@ const TextLink = styled(Text)` ` const ChartModalContainer = styled(Box)` - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); ` const LoadingErrorModal = () => { @@ -60,7 +54,7 @@ export const StatPage = (props: StatProps) => { rows.push( { return {parseKeyValue(key)}: {props.items[i][key]} })} - {/* - {props.keys.map((key, _) => { - return {parseKeyValue(key)}: {props.items[i][key]} - })} - */} ) } @@ -129,7 +118,7 @@ export const StatPage = (props: StatProps) => { Loading Data } {!isLoading && loadingError && } - {rows} + {!isLoading && !loadingError && rows}