Skip to content

Commit 18cd684

Browse files
authored
Merge pull request #924 from dacadeorg/fix/profile-community-color
fix: update the community color state
2 parents b867fa0 + ca1210a commit 18cd684

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/store/feature/profile/communities.slice.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Submission } from "@/types/bounty";
22
import { Community } from "@/types/community";
33
import { Feedback } from "@/types/feedback";
44
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
5-
import { setColors } from "../ui.slice";
65
import { HYDRATE } from "next-redux-wrapper";
76

87
interface InitialState {
@@ -34,7 +33,6 @@ const communitiesProfile = createSlice({
3433
initialState,
3534
reducers: {
3635
setCurrentProfileCommunity(state, action: PayloadAction<Community>) {
37-
setColors(action.payload.colors);
3836
state.current = action.payload;
3937
},
4038
setListProfileCommunities(state, action: PayloadAction<Community[]>) {

src/store/services/profile/profileCommunities.service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
setProfileCommunityReputation,
1010
setProfileCommunitySubmissions,
1111
} from "@/store/feature/profile/communities.slice";
12+
import { setColors } from "@/store/feature/ui.slice";
1213
import { Reputation, Submission } from "@/types/bounty";
1314
import { Community } from "@/types/community";
1415
import { Feedback } from "@/types/feedback";
@@ -72,6 +73,7 @@ const profileCommunitiesService: any = createApi({
7273
dispatch(setProfileCommunityFeedbacks(data.feedbacks));
7374
dispatch(setProfileCommunitySubmissions(data.submissions));
7475
dispatch(setProfileCommunityReputation(data.reputation));
76+
dispatch(setColors(data.community.colors));
7577
} catch (error) {
7678
dispatch(setBusy(false));
7779
dispatch(setError(error));

0 commit comments

Comments
 (0)