Update prettier
This commit is contained in:
@@ -81,7 +81,7 @@ function addChart(state: ChartsState, action: AddChart) {
|
||||
|
||||
function moveUp(state: ChartsState, action: MoveUp) {
|
||||
const charts = state.get('charts')
|
||||
const idx = charts.findIndex(chart => chart.topic === action.topic && chart.dotPath === action.dotPath)
|
||||
const idx = charts.findIndex((chart) => chart.topic === action.topic && chart.dotPath === action.dotPath)
|
||||
const item = charts.get(idx)
|
||||
const previousItem = charts.get(idx - 1)
|
||||
|
||||
@@ -95,7 +95,7 @@ function moveUp(state: ChartsState, action: MoveUp) {
|
||||
|
||||
function updateChart(state: ChartsState, action: UpdateChart) {
|
||||
const charts = state.get('charts')
|
||||
const chartIdx = charts.findIndex(chart => chart.topic === action.topic && chart.dotPath === action.dotPath)
|
||||
const chartIdx = charts.findIndex((chart) => chart.topic === action.topic && chart.dotPath === action.dotPath)
|
||||
const chart = charts.get(chartIdx)
|
||||
|
||||
return state.set('charts', chart ? charts.set(chartIdx, { ...chart, ...action.parameters }) : charts)
|
||||
@@ -103,7 +103,9 @@ function updateChart(state: ChartsState, action: UpdateChart) {
|
||||
|
||||
function removeChart(state: ChartsState, action: RemoveChart) {
|
||||
const charts = state.get('charts')
|
||||
const newCharts = charts.filter(chart => chart.topic !== action.chart.topic || chart.dotPath !== action.chart.dotPath)
|
||||
const newCharts = charts.filter(
|
||||
(chart) => chart.topic !== action.chart.topic || chart.dotPath !== action.chart.dotPath
|
||||
)
|
||||
return state.set('charts', newCharts)
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ function addSubscription(state: ConnectionManagerState, action: AddSubscription)
|
||||
|
||||
function deleteSubscription(state: ConnectionManagerState, action: AddSubscription): ConnectionManagerState {
|
||||
const connection = state.connections[action.connectionId]
|
||||
const newSubscriptions = connection.subscriptions.filter(s => s !== action.subscription)
|
||||
const newSubscriptions = connection.subscriptions.filter((s) => s !== action.subscription)
|
||||
|
||||
return {
|
||||
...state,
|
||||
|
||||
@@ -90,7 +90,7 @@ export const globalState: Reducer<Record<GlobalStateInterface>, GlobalAction> =
|
||||
}
|
||||
return state.set(
|
||||
'confirmationRequests',
|
||||
state.get('confirmationRequests').filter(a => a !== action.confirmationRequest)
|
||||
state.get('confirmationRequests').filter((a) => a !== action.confirmationRequest)
|
||||
)
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user