Skip to content

Commit

Permalink
Merge pull request #67 from Yura-Platonov/ChangePass
Browse files Browse the repository at this point in the history
add
  • Loading branch information
LaPaNu4 authored Jan 4, 2024
2 parents 995ad91 + eb64313 commit 1c0a2e1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/components/SearchLIstTAB/SearchListTab.styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import styled from 'styled-components';

export const Div = styled.div`
display: flex;
flex-wrap: wrap;
gap: 8px;
`

Expand Down
4 changes: 2 additions & 2 deletions src/redux/user/opetations.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ export const acceptCode = createAsyncThunk(
try {
const codeApi = `api/users/accept/code/${code}`;
console.log(codeApi);
await instance.put(codeApi);
const response = await instance.put(codeApi);
console.log(codeApi);
console.log("code accepted")
return;
return response.data;
} catch (error) {
console.log(`Code failed. Try again`);
return rejectWithValue(error.message);
Expand Down
8 changes: 4 additions & 4 deletions src/redux/user/userSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const userSlice = createSlice({
})
.addCase(getUser.rejected, (state, { payload }) => {
state.isLoading = false;
state.error = payload.error;
state.error = payload;
})
.addCase(changeUser.fulfilled, state => {
state.isLoading = false;
Expand All @@ -44,7 +44,7 @@ export const userSlice = createSlice({
})
.addCase(deleteUser.rejected, (state, { payload }) => {
state.isLoading = false;
state.error = payload.error;
state.error = payload;
})
.addCase(forgotPass.fulfilled, state => {
state.isLoading = false;
Expand All @@ -66,7 +66,7 @@ export const userSlice = createSlice({
})
.addCase(changePass.rejected, (state, { payload }) => {
state.isLoading = false;
state.error = payload.error;
state.error = payload;
})
.addCase(acceptCode.fulfilled, (state, { payload }) => {
state.user = payload;
Expand All @@ -78,7 +78,7 @@ export const userSlice = createSlice({
})
.addCase(acceptCode.rejected, (state, { payload }) => {
state.isLoading = false;
state.error = payload.error;
state.error = payload;
});
},
});
Expand Down

0 comments on commit 1c0a2e1

Please sign in to comment.