Skip to content

Commit c513c68

Browse files
committed
Cleanup unused code
1 parent 8a75935 commit c513c68

File tree

5 files changed

+5
-84
lines changed

5 files changed

+5
-84
lines changed

src/filing/submission/upload/FileProcessingProgress.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useState } from 'react';
1+
import React, { useEffect } from 'react';
22
import { UPLOADING } from '../../constants/statusCodes'
33
import { UploadBar } from './UploadBar'
44
import ProgressBar from './ProgressBar/'
@@ -25,7 +25,7 @@ const getStatus = (str, prevErrors, isSV) => {
2525
const hasError = str => str.match(/Err/)
2626

2727
const FileProcessingProgress = ({ progress, uploading, code, watchProgress, filingPeriod, lei }) => {
28-
const { done, syntactical, macro, quality, fetched } = progress
28+
const { syntactical, macro, quality, fetched } = progress
2929

3030
useEffect(() => {
3131
if (!fetched) watchProgress()

src/filing/submission/upload/ProgressBar/ProgressBar.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
.meter.progress { background: #75afe9; }
4848
.meter.progress .fill { background: #308ae4; }
4949

50-
/* Stripped Overlay */
50+
/* Striped Overlay */
5151
.meter.striped > .fill::after {
5252
content: '';
5353
position: absolute;

src/filing/submission/upload/UploadBar.jsx

+1-72
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export class UploadBar extends Component {
3030
}
3131

3232
saveWidth(filingPeriod, lei, width) {
33-
// if (this.props.errorUpload || this.props.errorApp) width = 0
3433
localStorage.setItem(`HMDA_UPLOAD_PROGRESS/${filingPeriod}/${lei}`, JSON.stringify(width))
3534
}
3635

@@ -85,74 +84,4 @@ export class UploadBar extends Component {
8584
/>
8685
)
8786
}
88-
}
89-
90-
91-
92-
93-
94-
95-
96-
97-
98-
99-
100-
101-
102-
103-
104-
105-
106-
107-
108-
109-
110-
111-
112-
// const UploadBar = props => {
113-
// const [state, updateState] = useState({ fillWidth: '10', firstRender: true, scalingFactor: 1 })
114-
115-
// const setState = obj => updateState(state => ({ ...state, ...obj }))
116-
117-
// useEffect(() => {
118-
// if(state.firstRender) setState({ firstRender: false })
119-
// }, [state.firstRender])
120-
121-
// useEffect(() => {
122-
// return function onUnmount() {
123-
// console.log('UploadBar will unmount')
124-
// }
125-
// }, [])
126-
127-
// function getNextWidth() {
128-
// const fillWidth = state.fillWidth
129-
// setState({ timeout: setTimeout(
130-
// setNextWidth(fillWidth),
131-
// state.SCALING_FACTOR * 200 * Math.pow(2, 50 / (100 - fillWidth))
132-
// )})
133-
// }
134-
135-
// function setNextWidth(currWidth) {
136-
// return () => {
137-
// state.timeout = null
138-
// let nextWidth = parseInt(currWidth) + 1
139-
// if (nextWidth > 100) nextWidth = '100'
140-
// setState({ fillWidth: nextWidth.toString() })
141-
// }
142-
// }
143-
144-
// function getFillWidth() {
145-
// if(state.firstRender) return '0'
146-
// if (parseInt(state.fillWidth) > 100) return '100'
147-
// if (!props.uploading) return '100'
148-
// else if (!state.timeout) getNextWidth()
149-
150-
// return state.fillWidth
151-
// }
152-
153-
154-
// console.log('First render: ', state.firstRender)
155-
// console.log('fillWidth: ', state.fillWidth)
156-
157-
// return <ProgressBar percent={getFillWidth()} label='Upload' />
158-
// }
87+
}

src/filing/submission/upload/ValidationProgress.jsx

-8
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,6 @@ export default class ValidationProgress extends PureComponent {
101101
if (code < UPLOADING && !uploading) return null
102102
return (
103103
<section className="ValidationProgress">
104-
{/* TODO: Cleanup unused styles */}
105-
{/* the background bar */}
106-
{/* <div className="progressTotal" /> */}
107-
{/* the progress bar */}
108-
{/* <div
109-
className={`progressFill ${this.getFillError()}`}
110-
style={{ width: this.getFillWidth() + '%' }}
111-
/> */}
112104
<ProgressText
113105
errorApp={errorApp}
114106
errorUpload={errorUpload}

src/filing/submission/upload/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default class Upload extends Component {
107107
filingPeriod={filingPeriod}
108108
lei={lei}
109109
uploading={uploading}
110-
/>
110+
/>
111111
</section>
112112
)
113113
}

0 commit comments

Comments
 (0)