mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 09:36:27 +00:00
Also turn off logging and longer checksum interval to improve performance 94K movehub fw flashes in about 1:45
25 lines
647 B
TypeScript
25 lines
647 B
TypeScript
import React from 'react';
|
|
import ProgressBar from 'react-bootstrap/ProgressBar';
|
|
import { connect } from 'react-redux';
|
|
import { RootState } from '../reducers';
|
|
|
|
type StateProps = { progress: number };
|
|
|
|
type StatusProps = StateProps;
|
|
|
|
class StatusBar extends React.Component<StatusProps> {
|
|
render(): JSX.Element {
|
|
return (
|
|
<div className="bg-info p-2">
|
|
<ProgressBar className="w-25" now={this.props.progress} />
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
const mapStateToProps = (state: RootState): StateProps => ({
|
|
progress: state.status.progress,
|
|
});
|
|
|
|
export default connect(mapStateToProps)(StatusBar);
|