Skip to content

Commit

Permalink
Clean up logs
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecoberly committed Nov 2, 2023
1 parent 57454eb commit 8f84306
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/slices/apiSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const apiSlice = createApi({
baseQuery: fetchBaseQuery({
baseUrl: import.meta.env.VITE_ACTIVITY_API_BASE_URL,
prepareHeaders: async (headers, { getState }) => {
console.log(getState());
const token = await getToken();

headers.set("Authorization", `Bearer ${token}`);
Expand Down
33 changes: 16 additions & 17 deletions src/slices/userSlice.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
import { createSlice } from "@reduxjs/toolkit";

const initialState = {
"https://sikaeducation.com/role": "",
email: "",
name: "",
picture: "",
isAuthenticated: false,
isLoading: false,
"https://sikaeducation.com/role": "",
email: "",
name: "",
picture: "",
isAuthenticated: false,
isLoading: false,
};

export const userSlice = createSlice({
name: "user",
initialState,
reducers: {
setUser: (state, action: { payload: typeof initialState }) => {
console.log(action.payload);
state = {
...action.payload,
};
return state;
},
},
name: "user",
initialState,
reducers: {
setUser: (state, action: { payload: typeof initialState }) => {
state = {
...action.payload,
};
return state;
},
},
});

export const { setUser } = userSlice.actions;
Expand Down

0 comments on commit 8f84306

Please sign in to comment.