Remove index===3 checks from getStyleForProjectedBlockAtIndex

This commit is contained in:
rbrooklyn 2020-02-14 16:52:01 +00:00 committed by GitHub
parent 2b94cab046
commit f8706f0a62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,22 +41,12 @@ export class BlockchainProjectedBlocksComponent implements OnInit, OnDestroy {
getStyleForProjectedBlockAtIndex(index: number) {
const greenBackgroundHeight = 100 - (this.projectedBlocks[index].blockWeight / 4000000) * 100;
if (window.innerWidth <= 768) {
if (index === 3) {
return {
'top': 40 + index * 155 + 'px'
};
}
return {
'top': 40 + index * 155 + 'px',
'background': `repeating-linear-gradient(#554b45, #554b45 ${greenBackgroundHeight}%,
#bd7c13 ${Math.max(greenBackgroundHeight, 0)}%, #c5345a 100%)`,
};
} else {
if (index === 3) {
return {
'right': 40 + index * 155 + 'px'
};
}
return {
'right': 40 + index * 155 + 'px',
'background': `repeating-linear-gradient(#554b45, #554b45 ${greenBackgroundHeight}%,