Skip to content

Commit

Permalink
chore(reducer): changed name of togglecolumn to setcolumn in reducer
Browse files Browse the repository at this point in the history
  • Loading branch information
vildeopp committed Jul 14, 2023
1 parent 38a73f5 commit 3032aed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions next-tavla/src/Admin/scenarios/Edit/reducer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type Action =
| { type: 'updateTile'; tileIndex: number; tile: TTile }
| { type: 'swapTiles'; oldIndex: number; newIndex: number }
| { type: 'toggleLine'; tileId: string; lineId: string }
| { type: 'toggleColumn'; tileId: string; column: TColumn; value: boolean }
| { type: 'setColumn'; tileId: string; column: TColumn; value: boolean }

export function settingsReducer(
settings: TSettings,
Expand Down Expand Up @@ -93,7 +93,7 @@ export function settingsReducer(
},
)
}
case 'toggleColumn': {
case 'setColumn': {
return changeTile<TStopPlaceTile | TQuayTile>(
action.tileId,
(tile) => {
Expand Down
2 changes: 1 addition & 1 deletion next-tavla/src/Admin/scenarios/ToggleColumns/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function ToggleColumns({ tile }: { tile: TTile }) {

function handleSwitch(column: TColumn, value: boolean) {
dispatch({
type: 'toggleColumn',
type: 'setColumn',
column: column,
value: value,
tileId: tile.uuid,
Expand Down

0 comments on commit 3032aed

Please sign in to comment.