fixed channel host missing icon

This commit is contained in:
Roland Osborne 2022-04-25 23:01:16 -07:00
parent a5af21fefb
commit 77bbb4cadc
2 changed files with 10 additions and 22 deletions

View File

@ -13,15 +13,7 @@ export function useChannelLabel() {
const profile = useContext(ProfileContext);
const actions = {
getCardByGuid: (guid) => {
let c = null;
card.state.cards.forEach((value, key, map) => {
if(value?.data?.cardProfile?.guid == guid) {
c = value;
}
});
return c;
},
getCardByGuid: card.actions.getCardByGuid,
};
const updateState = (value) => {
@ -29,8 +21,10 @@ export function useChannelLabel() {
}
useEffect(() => {
if (card.state.init && profile.state.init) {
updateState({ guid: profile.state.profile.guid });
}, [profile])
}
}, [card, profile])
return { state, actions };
}

View File

@ -13,15 +13,7 @@ export function useChannelLogo() {
const actions = {
getCardImageUrl: card.actions.getImageUrl,
getCardByGuid: (guid) => {
let c = null;
card.state.cards.forEach((value, key, map) => {
if(value?.data?.cardProfile?.guid == guid) {
c = value;
}
});
return c;
},
getCardByGuid: card.actions.getCardByGuid,
};
const updateState = (value) => {
@ -29,8 +21,10 @@ export function useChannelLogo() {
}
useEffect(() => {
if (card.state.init && profile.state.init) {
updateState({ guid: profile.state.profile.guid })
}, [profile])
}
}, [card, profile])
return { state, actions };
}