mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 02:23:47 +00:00
fix: check apps before subscription on connection page
Move the empty apps check before the subscription check so that an empty or unconfigured appConfig shows "not configured" instead of the misleading "no subscription" message.
This commit is contained in:
@@ -108,22 +108,7 @@ export default function Connection() {
|
||||
);
|
||||
}
|
||||
|
||||
// No subscription
|
||||
if (!appConfig.hasSubscription) {
|
||||
return (
|
||||
<div className="flex flex-1 flex-col items-center justify-center p-8 text-center">
|
||||
<h3 className="mb-2 text-xl font-bold text-dark-100">
|
||||
{t('subscription.connection.title')}
|
||||
</h3>
|
||||
<p className="mb-4 text-dark-400">{t('subscription.connection.noSubscription')}</p>
|
||||
<button onClick={handleGoBack} className="btn-primary px-6 py-2">
|
||||
{t('common.close')}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// No apps configured
|
||||
// No apps configured — check before subscription since empty config also has no subscription
|
||||
if (!hasApps) {
|
||||
return (
|
||||
<div className="flex flex-1 flex-col items-center justify-center p-8 text-center">
|
||||
@@ -177,6 +162,21 @@ export default function Connection() {
|
||||
);
|
||||
}
|
||||
|
||||
// No subscription
|
||||
if (!appConfig.hasSubscription) {
|
||||
return (
|
||||
<div className="flex flex-1 flex-col items-center justify-center p-8 text-center">
|
||||
<h3 className="mb-2 text-xl font-bold text-dark-100">
|
||||
{t('subscription.connection.title')}
|
||||
</h3>
|
||||
<p className="mb-4 text-dark-400">{t('subscription.connection.noSubscription')}</p>
|
||||
<button onClick={handleGoBack} className="btn-primary px-6 py-2">
|
||||
{t('common.close')}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<InstallationGuide
|
||||
appConfig={appConfig}
|
||||
|
||||
Reference in New Issue
Block a user