()
| 125 | const isUploading = state === 'uploading' || state === 'waitingUpload' |
| 126 | |
| 127 | const renderUploading = () => { |
| 128 | if (!isUploading) return null |
| 129 | return ( |
| 130 | <div tw="absolute left-0 top-0 w-full h-full flex justify-center items-center text-primary"> |
| 131 | {percentage !== undefined && ( |
| 132 | <div |
| 133 | css={[ |
| 134 | tw`w-1/3 h-2 rounded bg-gray-400/30 relative overflow-hidden`, |
| 135 | css` |
| 136 | min-width: 8px; |
| 137 | `, |
| 138 | ]} |
| 139 | > |
| 140 | <div |
| 141 | tw="absolute left-0 top-0 h-full bg-primary animate-pulse" |
| 142 | style={{ width: `${percentage}%` }} |
| 143 | ></div> |
| 144 | </div> |
| 145 | )} |
| 146 | {percentage === undefined && <Icon name="loading" />} |
| 147 | </div> |
| 148 | ) |
| 149 | } |
| 150 | |
| 151 | const renderLoading = () => { |
| 152 | if (!loading || loaded) return null |
no outgoing calls
no test coverage detected
searching dependent graphs…