mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
fix(console): app guard cards in drawer view should not have buttons (#4374)
This commit is contained in:
parent
514a6813b4
commit
db2f38c09e
1 changed files with 15 additions and 15 deletions
|
@ -27,10 +27,6 @@ type Props = {
|
||||||
isCompact?: boolean;
|
isCompact?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
function LogoSkeleton() {
|
|
||||||
return <div className={styles.logoSkeleton} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
function GuideCard({ data, onClick, hasBorder, isCompact }: Props) {
|
function GuideCard({ data, onClick, hasBorder, isCompact }: Props) {
|
||||||
const { navigate } = useTenantPathname();
|
const { navigate } = useTenantPathname();
|
||||||
const { currentTenantId } = useContext(TenantsContext);
|
const { currentTenantId } = useContext(TenantsContext);
|
||||||
|
@ -68,7 +64,7 @@ function GuideCard({ data, onClick, hasBorder, isCompact }: Props) {
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<div className={styles.header}>
|
<div className={styles.header}>
|
||||||
<Suspense fallback={<LogoSkeleton />}>
|
<Suspense fallback={<div className={styles.logoSkeleton} />}>
|
||||||
<Logo className={styles.logo} />
|
<Logo className={styles.logo} />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
<div className={styles.infoWrapper}>
|
<div className={styles.infoWrapper}>
|
||||||
|
@ -79,8 +75,11 @@ function GuideCard({ data, onClick, hasBorder, isCompact }: Props) {
|
||||||
<div className={styles.description}>{description}</div>
|
<div className={styles.description}>{description}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{!isCompact && (
|
||||||
<Button
|
<Button
|
||||||
title={isSubscriptionRequired ? 'upsell.upgrade_plan' : 'applications.guide.start_building'}
|
title={
|
||||||
|
isSubscriptionRequired ? 'upsell.upgrade_plan' : 'applications.guide.start_building'
|
||||||
|
}
|
||||||
size="small"
|
size="small"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (isSubscriptionRequired) {
|
if (isSubscriptionRequired) {
|
||||||
|
@ -90,6 +89,7 @@ function GuideCard({ data, onClick, hasBorder, isCompact }: Props) {
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue