Skip to content

Commit

Permalink
fix: fix regression with progress bar not displaying
Browse files Browse the repository at this point in the history
  • Loading branch information
robinpyon committed Dec 16, 2020
1 parent a40bb89 commit 4a905b5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/Progress/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {Box} from '@sanity/ui'
import {useNProgress} from '@tanem/react-nprogress'
import React from 'react'
import {Box} from 'theme-ui'
import React, {FC} from 'react'

type Props = {
loading?: boolean
}

const Progress = (props: Props) => {
const Progress: FC<Props> = (props: Props) => {
const {loading} = props

const {animationDuration, isFinished, progress} = useNProgress({
Expand All @@ -16,14 +16,15 @@ const Progress = (props: Props) => {

return (
<Box
sx={{
style={{
opacity: isFinished ? 0 : 1,
transition: `opacity ${animationDuration}ms linear`
}}
>
<Box
sx={{
style={{
height: '1px',
background: 'rgba(255, 255, 255, 0.5)',
position: 'absolute',
left: 0,
top: 0,
Expand Down

0 comments on commit 4a905b5

Please sign in to comment.