chore: tidy
This commit is contained in:
parent
b852b564e8
commit
b7731fb8ab
|
@ -15,7 +15,6 @@ export const hooks = {
|
||||||
},
|
},
|
||||||
'@flecks/core.webpack': (target, config) => {
|
'@flecks/core.webpack': (target, config) => {
|
||||||
if ('web' === target) {
|
if ('web' === target) {
|
||||||
// eslint-disable-next-line no-param-reassign
|
|
||||||
config.devServer.writeToDisk = true;
|
config.devServer.writeToDisk = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,11 +25,11 @@ const normalizeDisplayName = (displayName) => (
|
||||||
displayName.startsWith('HotExported') ? displayName.slice(11) : displayName
|
displayName.startsWith('HotExported') ? displayName.slice(11) : displayName
|
||||||
);
|
);
|
||||||
|
|
||||||
const Organization = ({
|
function Organization({
|
||||||
label,
|
label,
|
||||||
resourcePaths,
|
resourcePaths,
|
||||||
uuid,
|
uuid,
|
||||||
}) => {
|
}) {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const current = useSelector(currentResourceSelector);
|
const current = useSelector(currentResourceSelector);
|
||||||
const flecks = useFlecks();
|
const flecks = useFlecks();
|
||||||
|
@ -69,14 +69,12 @@ const Organization = ({
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const next = createNextState(expanded, (draft) => {
|
const next = createNextState(expanded, (draft) => {
|
||||||
/* eslint-disable no-param-reassign */
|
|
||||||
if (value in draft) {
|
if (value in draft) {
|
||||||
delete draft[value];
|
delete draft[value];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
draft[value] = true;
|
draft[value] = true;
|
||||||
}
|
}
|
||||||
/* eslint-enable no-param-reassign */
|
|
||||||
});
|
});
|
||||||
setExpanded(next);
|
setExpanded(next);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,14 +10,12 @@ export const projectSelector = (state) => state.project;
|
||||||
const slice = createSlice({
|
const slice = createSlice({
|
||||||
name: 'persea/project',
|
name: 'persea/project',
|
||||||
initialState: null,
|
initialState: null,
|
||||||
/* eslint-disable no-param-reassign */
|
|
||||||
reducers: {
|
reducers: {
|
||||||
setProject: (state, {payload}) => payload,
|
setProject: (state, {payload}) => payload,
|
||||||
},
|
},
|
||||||
extraReducers: (builder) => {
|
extraReducers: (builder) => {
|
||||||
builder.addCase(hydrateServer, (state, {payload}) => payload.req[HydrateServer]);
|
builder.addCase(hydrateServer, (state, {payload}) => payload.req[HydrateServer]);
|
||||||
},
|
},
|
||||||
/* eslint-enable no-param-reassign */
|
|
||||||
});
|
});
|
||||||
|
|
||||||
slice.reducer.hydrateServer = async (req) => {
|
slice.reducer.hydrateServer = async (req) => {
|
||||||
|
|
|
@ -51,7 +51,6 @@ const slice = createSlice({
|
||||||
pending: {},
|
pending: {},
|
||||||
resources: {},
|
resources: {},
|
||||||
},
|
},
|
||||||
/* eslint-disable no-param-reassign */
|
|
||||||
extraReducers: (builder) => {
|
extraReducers: (builder) => {
|
||||||
builder.addCase(hydrateServer, (state, action) => {
|
builder.addCase(hydrateServer, (state, action) => {
|
||||||
const {req} = action.payload;
|
const {req} = action.payload;
|
||||||
|
@ -89,7 +88,6 @@ const slice = createSlice({
|
||||||
// delete resources[`${project}${from}`];
|
// delete resources[`${project}${from}`];
|
||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
/* eslint-enable no-param-reassign */
|
|
||||||
});
|
});
|
||||||
|
|
||||||
slice.reducer.hydrateServer = async (req) => {
|
slice.reducer.hydrateServer = async (req) => {
|
||||||
|
|
|
@ -22,7 +22,6 @@ const slice = createSlice({
|
||||||
current: null,
|
current: null,
|
||||||
open: [],
|
open: [],
|
||||||
},
|
},
|
||||||
/* eslint-disable no-param-reassign */
|
|
||||||
reducers: {
|
reducers: {
|
||||||
closeResource: (state, {payload}) => {
|
closeResource: (state, {payload}) => {
|
||||||
const index = state.open.findIndex(({uri}) => uri === payload);
|
const index = state.open.findIndex(({uri}) => uri === payload);
|
||||||
|
@ -48,7 +47,6 @@ const slice = createSlice({
|
||||||
state.open = openResourcesSelector(payload);
|
state.open = openResourcesSelector(payload);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/* eslint-enable no-param-reassign */
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export const {
|
export const {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user