Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fl0rek committed Jun 28, 2024
1 parent 41e7a45 commit d2fae83
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/parts/Form/Status/Progress/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const ProgressBar = ({ ranges, max, window, isBig }) => {
useEffect(() => {
console.log("ranges:", ranges);
const progress = ranges.reduce((acc, range) => acc + (range.end - range.start), 0);
setProgress((progress/max).toFixed(4) * 100);
setProgress((progress/window).toFixed(4) * 100);

}, [ranges]);

Expand Down
1 change: 0 additions & 1 deletion src/parts/Form/Status/Progress/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const Bar = styled.div(props => css`
border-radius: .6rem;
background: ${props.theme.colors.brand.bc4o30};
${props.$ranges.map((range) => css`
${console.log("vv", (range.start / props.$max) * 100, ((range.end - range.start) / props.$max) * 100)}
span {
position: absolute;
z-index: 1;
Expand Down
5 changes: 2 additions & 3 deletions src/parts/Form/Status/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ const StatusBoard = ({
<div>
<em>Sync window:</em>
</div>
<span>{stats.networkNeadHeight && css`
{stats.networkHeadHeight}-{stats.networkHeadHeight - stats.approxSyncingWindowSize}
`}
<span>
{Math.max(stats.networkHeadHeight, 0)}-{Math.max(stats.networkHeadHeight - stats.approxSyncingWindowSize, 0)}
</span>
</div>
<div className="break-small">
Expand Down
2 changes: 0 additions & 2 deletions src/parts/Form/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ const Form = () => {
array.push([key, value])
})

// console.dir(array);

// Update the state with the new event data
setEventData((prev) => {
return [array, ...prev];
Expand Down

0 comments on commit d2fae83

Please sign in to comment.