Fix showing uninstall button twice in extension info page
In case the extensions has an available update and is obsolete at the same time, the uninstall button was shown twice. An obsolete extension is not updatable; thus, the second button for the "update" action should not be shown.
This commit is contained in:
@@ -81,7 +81,7 @@ export const ExtensionInfo = () => {
|
||||
<Meta {...extension} />
|
||||
<Stack sx={{ flexDirection: 'row' }}>
|
||||
<ActionButton {...{ ...extension, isInstalled: true, hasUpdate: false }} />
|
||||
{extension.hasUpdate && <ActionButton {...extension} />}
|
||||
{extension.hasUpdate && !extension.isObsolete && <ActionButton {...extension} />}
|
||||
</Stack>
|
||||
<Box sx={{ px: 1 }}>
|
||||
{sources.map((source) => (
|
||||
|
||||
Reference in New Issue
Block a user