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:
schroda
2026-05-09 12:23:58 +02:00
parent f45b42b7b5
commit a7dfc05830
2 changed files with 2 additions and 1 deletions

View File

@@ -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) => (