mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
fix error on logout
This commit is contained in:
parent
3276764f70
commit
68d22fd69f
@ -27,9 +27,7 @@ export function Cards({ showRegistry }) {
|
|||||||
if (actions?.getCardImageUrl) {
|
if (actions?.getCardImageUrl) {
|
||||||
return actions.getCardImageUrl(item.id, item.revision);
|
return actions.getCardImageUrl(item.id, item.revision);
|
||||||
}
|
}
|
||||||
else {
|
return null
|
||||||
return null
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -13,6 +13,13 @@ export function Registry() {
|
|||||||
actions.select(item);
|
actions.select(item);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const registryImage = (item) => {
|
||||||
|
if (actions?.getRegistryImageUrl) {
|
||||||
|
return actions.getRegistryImageUrl(item.guid, item.revision);
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RegistryWrapper>
|
<RegistryWrapper>
|
||||||
<Input.Search placeholder="Server" value={state.server} onChange={(e) => actions.setServer(e.target.Value)}
|
<Input.Search placeholder="Server" value={state.server} onChange={(e) => actions.setServer(e.target.Value)}
|
||||||
@ -27,7 +34,7 @@ export function Registry() {
|
|||||||
<RegistryItem onClick={() => onSelect(item)}>
|
<RegistryItem onClick={() => onSelect(item)}>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<Logo imageUrl={actions.getRegistryImageUrl(item.guid, item.revision)}
|
<Logo imageUrl={registryImage(item)}
|
||||||
imageSet={item.imageSet} />
|
imageSet={item.imageSet} />
|
||||||
</div>
|
</div>
|
||||||
<div class="username">
|
<div class="username">
|
||||||
|
@ -41,7 +41,12 @@ export function useRegistry() {
|
|||||||
updateState({ busy: false });
|
updateState({ busy: false });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getRegistryImageUrl: (guid, revision) => app.actions.getRegistryImageUrl(state.server, guid, revision),
|
getRegistryImageUrl: (guid, revision) => {
|
||||||
|
if (app?.actions?.getRegistryImageUrl) {
|
||||||
|
return app.actions.getRegistryImageUrl(state.server, guid, revision);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
select: (contact) => {
|
select: (contact) => {
|
||||||
navigate(`/user/contact/${contact.guid}`, { state: contact });
|
navigate(`/user/contact/${contact.guid}`, { state: contact });
|
||||||
}
|
}
|
||||||
@ -50,5 +55,3 @@ export function useRegistry() {
|
|||||||
return { state, actions };
|
return { state, actions };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user