@@ -30,7 +30,6 @@ export class UploadBar extends Component {
30
30
}
31
31
32
32
saveWidth ( filingPeriod , lei , width ) {
33
- // if (this.props.errorUpload || this.props.errorApp) width = 0
34
33
localStorage . setItem ( `HMDA_UPLOAD_PROGRESS/${ filingPeriod } /${ lei } ` , JSON . stringify ( width ) )
35
34
}
36
35
@@ -85,74 +84,4 @@ export class UploadBar extends Component {
85
84
/>
86
85
)
87
86
}
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