fix: don't display setup page icon for these apps (#13537)
* fix: don't display setup page icon for these apps * chore: make it optional * chore: feedback --------- Co-authored-by: Keith Williams <keithwillcode@gmail.com>
This commit is contained in:
co-authored by
Keith Williams
parent
3e492eb17b
commit
f09153b3bb
@@ -21,6 +21,7 @@ export default function AppCard({
|
||||
teamId,
|
||||
disableSwitch,
|
||||
switchTooltip,
|
||||
hideSettingsIcon = false,
|
||||
}: {
|
||||
app: RouterOutputs["viewer"]["integrations"]["items"][number] & { credentialOwner?: CredentialOwner };
|
||||
description?: React.ReactNode;
|
||||
@@ -32,6 +33,7 @@ export default function AppCard({
|
||||
LockedIcon?: React.ReactNode;
|
||||
disableSwitch?: boolean;
|
||||
switchTooltip?: string;
|
||||
hideSettingsIcon?: boolean;
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [animationRef] = useAutoAnimate<HTMLDivElement>();
|
||||
@@ -124,9 +126,11 @@ export default function AppCard({
|
||||
{app?.isInstalled && switchChecked ? (
|
||||
app.isSetupAlready === undefined || app.isSetupAlready ? (
|
||||
<div className="relative p-4 pt-5 text-sm [&_input]:mb-0 [&_input]:leading-4">
|
||||
<Link href={`/apps/${app.slug}/setup`} className="absolute right-4 top-4">
|
||||
<Settings className="text-default h-4 w-4" aria-hidden="true" />
|
||||
</Link>
|
||||
{!hideSettingsIcon && (
|
||||
<Link href={`/apps/${app.slug}/setup`} className="absolute right-4 top-4">
|
||||
<Settings className="text-default h-4 w-4" aria-hidden="true" />
|
||||
</Link>
|
||||
)}
|
||||
{children}
|
||||
</div>
|
||||
) : (
|
||||
|
||||
@@ -13,6 +13,7 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
|
||||
|
||||
return (
|
||||
<AppCard
|
||||
hideSettingsIcon
|
||||
app={app}
|
||||
switchOnClick={(e) => {
|
||||
updateEnabled(e);
|
||||
|
||||
@@ -13,6 +13,7 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
|
||||
|
||||
return (
|
||||
<AppCard
|
||||
hideSettingsIcon
|
||||
app={app}
|
||||
switchOnClick={(e) => {
|
||||
updateEnabled(e);
|
||||
|
||||
@@ -13,6 +13,7 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
|
||||
|
||||
return (
|
||||
<AppCard
|
||||
hideSettingsIcon
|
||||
app={app}
|
||||
switchOnClick={(e) => {
|
||||
updateEnabled(e);
|
||||
|
||||
@@ -14,6 +14,7 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
|
||||
|
||||
return (
|
||||
<AppCard
|
||||
hideSettingsIcon
|
||||
app={app}
|
||||
switchOnClick={(e) => {
|
||||
updateEnabled(e);
|
||||
|
||||
@@ -13,6 +13,7 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
|
||||
|
||||
return (
|
||||
<AppCard
|
||||
hideSettingsIcon
|
||||
app={app}
|
||||
switchOnClick={updateEnabled}
|
||||
switchChecked={enabled}
|
||||
|
||||
@@ -14,6 +14,7 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
|
||||
|
||||
return (
|
||||
<AppCard
|
||||
hideSettingsIcon
|
||||
app={app}
|
||||
switchOnClick={(e) => {
|
||||
updateEnabled(e);
|
||||
|
||||
Reference in New Issue
Block a user