0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(console): app guard cards in drawer view should not have buttons (#4374)

This commit is contained in:
Charles Zhao 2023-08-18 03:30:19 -05:00 committed by GitHub
parent 514a6813b4
commit db2f38c09e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,10 +27,6 @@ type Props = {
isCompact?: boolean;
};
function LogoSkeleton() {
return <div className={styles.logoSkeleton} />;
}
function GuideCard({ data, onClick, hasBorder, isCompact }: Props) {
const { navigate } = useTenantPathname();
const { currentTenantId } = useContext(TenantsContext);
@ -68,7 +64,7 @@ function GuideCard({ data, onClick, hasBorder, isCompact }: Props) {
})}
>
<div className={styles.header}>
<Suspense fallback={<LogoSkeleton />}>
<Suspense fallback={<div className={styles.logoSkeleton} />}>
<Logo className={styles.logo} />
</Suspense>
<div className={styles.infoWrapper}>
@ -79,8 +75,11 @@ function GuideCard({ data, onClick, hasBorder, isCompact }: Props) {
<div className={styles.description}>{description}</div>
</div>
</div>
{!isCompact && (
<Button
title={isSubscriptionRequired ? 'upsell.upgrade_plan' : 'applications.guide.start_building'}
title={
isSubscriptionRequired ? 'upsell.upgrade_plan' : 'applications.guide.start_building'
}
size="small"
onClick={() => {
if (isSubscriptionRequired) {
@ -90,6 +89,7 @@ function GuideCard({ data, onClick, hasBorder, isCompact }: Props) {
}
}}
/>
)}
</div>
);
}