From a921e1384483c69eeca79c30bc975b7bb7305c70 Mon Sep 17 00:00:00 2001 From: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Date: Sat, 11 Feb 2023 11:22:44 -0700 Subject: [PATCH] fix: :lipstick: skeleton --- .../roadmap-grid/RoadmapDetailedView.tsx | 56 ++++++++----------- components/roadmap-grid/RoadmapTabbedView.tsx | 20 +++---- .../roadmap-grid/today-marker-toggle.tsx | 21 +++---- 3 files changed, 41 insertions(+), 56 deletions(-) diff --git a/components/roadmap-grid/RoadmapDetailedView.tsx b/components/roadmap-grid/RoadmapDetailedView.tsx index 24d9b35b..37540ac7 100644 --- a/components/roadmap-grid/RoadmapDetailedView.tsx +++ b/components/roadmap-grid/RoadmapDetailedView.tsx @@ -1,4 +1,4 @@ -import { Box, Spinner, Stack, Skeleton } from '@chakra-ui/react'; +import { Box, Spinner, Skeleton } from '@chakra-ui/react'; import { useHookstate } from '@hookstate/core'; import type { Dayjs } from 'dayjs'; import _ from 'lodash'; @@ -139,19 +139,6 @@ export function RoadmapDetailed({ return ; } - // return early while loading. - if (globalLoadingState.get()) { - return ( - - - - - - - - ) - } - /** * Current getTicks function returns 1 less than the number of ticks we want. */ @@ -164,24 +151,29 @@ export function RoadmapDetailed({ {isDevMode && } - - {ticksHeader.map((tick, index) => ( - - - ))} - - - - - {issuesGroupedState.map((group, index) => ( - - - {group.ornull != null && group.items.ornull != null && - _.sortBy(group.items.ornull, ['title']).map((item, index) => )} - - - ))} - + + + + {ticksHeader.map((tick, index) => ( + + + ))} + + + + + + + {issuesGroupedState.map((group, index) => ( + + + {group.ornull != null && group.items.ornull != null && + _.sortBy(group.items.ornull, ['title']).map((item, index) => )} + + + ))} + + ); diff --git a/components/roadmap-grid/RoadmapTabbedView.tsx b/components/roadmap-grid/RoadmapTabbedView.tsx index d3e3006a..3817ed8f 100644 --- a/components/roadmap-grid/RoadmapTabbedView.tsx +++ b/components/roadmap-grid/RoadmapTabbedView.tsx @@ -66,17 +66,15 @@ export function RoadmapTabbedView({ } return ( - - -
- - {title} -
-
-
+ +
+ + {title} +
+
) }; diff --git a/components/roadmap-grid/today-marker-toggle.tsx b/components/roadmap-grid/today-marker-toggle.tsx index 52fbe789..c5feb377 100644 --- a/components/roadmap-grid/today-marker-toggle.tsx +++ b/components/roadmap-grid/today-marker-toggle.tsx @@ -1,27 +1,22 @@ -import { Button, Skeleton, Text } from '@chakra-ui/react'; +import { Button, Text } from '@chakra-ui/react'; import React from 'react'; import SvgEyeClosedIcon from '../icons/svgr/SvgEyeClosedIcon'; import SvgEyeOpenIcon from '../icons/svgr/SvgEyeOpenIcon'; import { setShowTodayMarker, useShowTodayMarker } from '../../hooks/useShowTodayMarker'; - -import { useGlobalLoadingState } from '../../hooks/useGlobalLoadingState'; import styles from './today-marker.module.css'; export function TodayMarkerToggle() { const showTodayMarker = useShowTodayMarker(); - const globalLoadingState = useGlobalLoadingState(); return ( - - - + ); }