show assigned badge

This commit is contained in:
Delucse
2020-12-10 10:31:43 +01:00
parent 101dfc7692
commit 5430e783cc
3 changed files with 55 additions and 13 deletions
+2
View File
@@ -86,6 +86,7 @@ export const connectMyBadges = ({ username, password }) => (dispatch, getState)
.then(res => {
var user = getState().auth.user;
user.badge = res.data.account;
user.badges = res.data.badges;
dispatch({
type: MYBADGES_CONNECT,
payload: user
@@ -109,6 +110,7 @@ export const disconnectMyBadges = () => (dispatch, getState) => {
.then(res => {
var user = getState().auth.user;
user.badge = null;
user.badges = null;
dispatch({
type: MYBADGES_DISCONNECT,
payload: user