mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-03 06:11:48 +00:00
Update to JS coding standard v2.5.0
This commit is contained in:
@@ -44,4 +44,4 @@ export const isNotFoundServer = (server: SelectedServer): server is NotFoundServ
|
||||
|
||||
export const getServerId = (server: SelectedServer) => (isServerWithId(server) ? server.id : '');
|
||||
|
||||
export const serverWithIdToServerData = ({ id, autoConnect, ...server }: ServerWithId): ServerData => server;
|
||||
export const serverWithIdToServerData = ({ name, url, apiKey }: ServerWithId): ServerData => ({ name, url, apiKey });
|
||||
|
||||
@@ -44,8 +44,8 @@ export const { actions, reducer } = createSlice({
|
||||
},
|
||||
},
|
||||
deleteServer: (state, { payload }) => {
|
||||
const { [payload.id]: deletedServer, ...rest } = state;
|
||||
return rest;
|
||||
delete state[payload.id];
|
||||
return state;
|
||||
},
|
||||
setAutoConnect: {
|
||||
prepare: ({ id: serverId }: ServerWithId, autoConnect: boolean) => ({
|
||||
|
||||
Reference in New Issue
Block a user