Fixes double bottom border in Integration List Item (#5026)
* Fixes double bottom border in Integration List Item * Remove unused import
This commit is contained in:
1 parent
2e83c7fbf8
commit
2d30f673e3
3 files changed
+16
-7
No files matched your search
@@ -4,7 +4,6 @@ import z from "zod";
|
|||||||
import { AppSettings } from "@calcom/app-store/_components/AppSettings";
|
import { AppSettings } from "@calcom/app-store/_components/AppSettings";
|
||||||
import { InstallAppButton } from "@calcom/app-store/components";
|
import { InstallAppButton } from "@calcom/app-store/components";
|
||||||
import { InstalledAppVariants } from "@calcom/app-store/utils";
|
import { InstalledAppVariants } from "@calcom/app-store/utils";
|
||||||
import { classNames } from "@calcom/lib";
|
|
||||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||||
import { inferQueryOutput, trpc } from "@calcom/trpc/react";
|
import { inferQueryOutput, trpc } from "@calcom/trpc/react";
|
||||||
import { App } from "@calcom/types/App";
|
import { App } from "@calcom/types/App";
|
||||||
@@ -118,9 +117,7 @@ const IntegrationsList = ({ data }: IntegrationsListProps) => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
}>
|
}>
|
||||||
<div className="border-t border-gray-200">
|
<AppSettings slug={item.slug} />
|
||||||
<AppSettings slug={item.slug} />
|
|
||||||
</div>
|
|
||||||
</IntegrationListItem>
|
</IntegrationListItem>
|
||||||
))}
|
))}
|
||||||
</List>
|
</List>
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import { DynamicComponent } from "./DynamicComponent";
|
|||||||
|
|
||||||
export const AppSettings = (props: { slug: string }) => {
|
export const AppSettings = (props: { slug: string }) => {
|
||||||
return (
|
return (
|
||||||
<DynamicComponent<typeof AppSettingsComponentsMap> componentMap={AppSettingsComponentsMap} {...props} />
|
<DynamicComponent<typeof AppSettingsComponentsMap>
|
||||||
|
wrapperClassName="border-t border-gray-200"
|
||||||
|
componentMap={AppSettingsComponentsMap}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -1,9 +1,17 @@
|
|||||||
export function DynamicComponent<T extends Record<string, any>>(props: { componentMap: T; slug: string }) {
|
export function DynamicComponent<T extends Record<string, any>>(props: {
|
||||||
|
componentMap: T;
|
||||||
|
slug: string;
|
||||||
|
wrapperClassName?: string;
|
||||||
|
}) {
|
||||||
const { componentMap, slug, ...rest } = props;
|
const { componentMap, slug, ...rest } = props;
|
||||||
|
|
||||||
if (!componentMap[slug]) return null;
|
if (!componentMap[slug]) return null;
|
||||||
|
|
||||||
const Component = componentMap[slug];
|
const Component = componentMap[slug];
|
||||||
|
|
||||||
return <Component {...rest} />;
|
return (
|
||||||
|
<div className={props.wrapperClassName || ""}>
|
||||||
|
<Component {...rest} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user