Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into tauri-publish-asset
Browse files Browse the repository at this point in the history
  • Loading branch information
lucarin91 committed May 31, 2024
2 parents 891ea97 + a0e46e0 commit d115a1c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
13 changes: 6 additions & 7 deletions installer/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ function App() {
}, []);

const updateLeftServo = (ev) => {
setLeftServo(ev.currentTarget.value);
setLeftServo(Number(ev.currentTarget.value));
};
const updateRightServo = (ev) => {
setRightServo(ev.currentTarget.value);
setRightServo(Number(ev.currentTarget.value));
};

const updateName = (ev) => {
Expand Down Expand Up @@ -108,10 +108,9 @@ function App() {
code: data.code, // atm code is not used
});
} else {
dispatch({
type: 'GENERIC_ERROR',
error: new Error('Error uploading sketch'),
});
handleError(
new Error(`Unknown error uploading sketch: ${data.code}`)
);
}
};

Expand Down Expand Up @@ -245,7 +244,7 @@ function App() {
</div>
</form>
{state.error && (
<p className="text-red-600 container mx-auto">
<p className="text-red-600 container mx-auto pt-2">
{state.error?.message}
</p>
)}
Expand Down
3 changes: 2 additions & 1 deletion installer/src/reducers/state-reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ const reducer = (state, action) => {
uploading: false,
uploadButtonEnabled:
state.boards?.length > 0 && state.selectedBoard,
error: action.error,
error: new Error(action.error?.toString()),
};

case 'BOARDS_RETRIEVED':
return {
...state,
Expand Down

0 comments on commit d115a1c

Please sign in to comment.