Skip to content

Commit b2c4713

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

File tree

1 file changed

+1
-72
lines changed

1 file changed

+1
-72
lines changed

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+
}

0 commit comments

Comments
 (0)