mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 11:39:17 +00:00
fixed channel host missing icon
This commit is contained in:
parent
a5af21fefb
commit
77bbb4cadc
@ -13,15 +13,7 @@ export function useChannelLabel() {
|
|||||||
const profile = useContext(ProfileContext);
|
const profile = useContext(ProfileContext);
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
getCardByGuid: (guid) => {
|
getCardByGuid: card.actions.getCardByGuid,
|
||||||
let c = null;
|
|
||||||
card.state.cards.forEach((value, key, map) => {
|
|
||||||
if(value?.data?.cardProfile?.guid == guid) {
|
|
||||||
c = value;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return c;
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateState = (value) => {
|
const updateState = (value) => {
|
||||||
@ -29,8 +21,10 @@ export function useChannelLabel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (card.state.init && profile.state.init) {
|
||||||
updateState({ guid: profile.state.profile.guid });
|
updateState({ guid: profile.state.profile.guid });
|
||||||
}, [profile])
|
}
|
||||||
|
}, [card, profile])
|
||||||
|
|
||||||
return { state, actions };
|
return { state, actions };
|
||||||
}
|
}
|
||||||
|
@ -13,15 +13,7 @@ export function useChannelLogo() {
|
|||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
getCardImageUrl: card.actions.getImageUrl,
|
getCardImageUrl: card.actions.getImageUrl,
|
||||||
getCardByGuid: (guid) => {
|
getCardByGuid: card.actions.getCardByGuid,
|
||||||
let c = null;
|
|
||||||
card.state.cards.forEach((value, key, map) => {
|
|
||||||
if(value?.data?.cardProfile?.guid == guid) {
|
|
||||||
c = value;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return c;
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateState = (value) => {
|
const updateState = (value) => {
|
||||||
@ -29,8 +21,10 @@ export function useChannelLogo() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (card.state.init && profile.state.init) {
|
||||||
updateState({ guid: profile.state.profile.guid })
|
updateState({ guid: profile.state.profile.guid })
|
||||||
}, [profile])
|
}
|
||||||
|
}, [card, profile])
|
||||||
|
|
||||||
return { state, actions };
|
return { state, actions };
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user