mirror of
https://github.com/vector-im/element-web.git
synced 2025-12-08 10:51:36 +01:00
Hide add integrations button based on UIComponent.AddIntegrations (#30140)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
1e3fd9d3aa
commit
a2bea649f6
@ -27,6 +27,8 @@ import AccessibleButton from "../elements/AccessibleButton";
|
|||||||
import WidgetAvatar from "../avatars/WidgetAvatar";
|
import WidgetAvatar from "../avatars/WidgetAvatar";
|
||||||
import { IntegrationManagers } from "../../../integrations/IntegrationManagers";
|
import { IntegrationManagers } from "../../../integrations/IntegrationManagers";
|
||||||
import EmptyState from "./EmptyState";
|
import EmptyState from "./EmptyState";
|
||||||
|
import { shouldShowComponent } from "../../../customisations/helpers/UIComponents.ts";
|
||||||
|
import { UIComponent } from "../../../settings/UIFeature.ts";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
room: Room;
|
room: Room;
|
||||||
@ -191,9 +193,11 @@ const ExtensionsCard: React.FC<Props> = ({ room, onClose }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseCard header={_t("right_panel|extensions_button")} className="mx_ExtensionsCard" onClose={onClose}>
|
<BaseCard header={_t("right_panel|extensions_button")} className="mx_ExtensionsCard" onClose={onClose}>
|
||||||
<Button size="sm" onClick={onManageIntegrations} kind="secondary" Icon={PlusIcon}>
|
{shouldShowComponent(UIComponent.AddIntegrations) && (
|
||||||
{_t("right_panel|add_integrations")}
|
<Button size="sm" onClick={onManageIntegrations} kind="secondary" Icon={PlusIcon}>
|
||||||
</Button>
|
{_t("right_panel|add_integrations")}
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
{body}
|
{body}
|
||||||
</BaseCard>
|
</BaseCard>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user