Skip to content

Commit

Permalink
Fix return statement to immediately expression (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
kabaliisa authored Mar 4, 2021
1 parent 6250187 commit 505d121
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions simplq/src/store/asyncActions/createQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@ const useCreateQueue = () => {
const makeAuthedRequest = useMakeAuthedRequest();
const history = useHistory();

const createQueue = createAsyncThunk(typePrefix, async ({ queueName }) => {
return createAsyncThunk(typePrefix, async ({ queueName }) => {
const authedRequest = makeAuthedRequest(RequestFactory.createQueue(queueName));
const response = await authedRequest;
if (response) {
history.push(`/queue/${response.queueId}`);
}
return response;
});

return createQueue;
};

const createQueue = createAsyncThunk(typePrefix);
Expand Down

0 comments on commit 505d121

Please sign in to comment.