Skip to content

Commit

Permalink
fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuift committed Aug 27, 2023
1 parent 103bfc5 commit a7a29b3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ export const GpioPinsConfig = () => {
<>
<SectionTitle>GPIO Control</SectionTitle>
<Container>
{gpioPins.map((gpioPin) => (
gpioPin.bpm ? <GpioBPMPin key={gpioPin.id} gpioPin={gpioPin} /> : <GpioPin key={gpioPin.id} gpioPin={gpioPin} />
))}
{gpioPins.map((gpioPin) =>
gpioPin.bpm ? (
<GpioBPMPin key={gpioPin.id} gpioPin={gpioPin} />
) : (
<GpioPin key={gpioPin.id} gpioPin={gpioPin} />
)
)}
</Container>
</>
);
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/store/modules/gpioPins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ export const gpioPinsSlice = createSlice({
removePin: (state, { payload }: PayloadAction<GpioPinState>) => {
state = state.filter((pin) => pin.id !== payload.id);
},
updateBPM: (state, { payload }: PayloadAction<{ id: string; bpm: number }>) => {
updateBPM: (
state,
{ payload }: PayloadAction<{ id: string; bpm: number }>
) => {
const element = state.find((element) => element.id === payload.id);
if (element) {
element.bpm = payload.bpm;
Expand Down

0 comments on commit a7a29b3

Please sign in to comment.