mirror of https://github.com/kortix-ai/suna.git
Merge pull request #1605 from escapade-mckv/billing-improvements-clean
maintenance notice on payment pages
This commit is contained in:
commit
3ce7c248fb
|
@ -67,11 +67,11 @@ export default function ActivateTrialPage() {
|
|||
router.push('/auth');
|
||||
};
|
||||
|
||||
const isLoading = isLoadingSubscription || isLoadingTrial || maintenanceLoading;
|
||||
const isMaintenanceLoading = maintenanceLoading;
|
||||
|
||||
if (isLoading) {
|
||||
if (isMaintenanceLoading) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-gradient-to-b from-background to-muted/20">
|
||||
<div className="min-h-screen bg-gradient-to-b from-background to-muted/20 flex items-center justify-center p-4">
|
||||
<Loader2 className="h-8 w-8 animate-spin text-primary" />
|
||||
</div>
|
||||
);
|
||||
|
@ -81,6 +81,16 @@ export default function ActivateTrialPage() {
|
|||
return <MaintenanceAlert open={true} onOpenChange={() => {}} closeable={false} />;
|
||||
}
|
||||
|
||||
const isLoading = isLoadingSubscription || isLoadingTrial;
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-gradient-to-b from-background to-muted/20">
|
||||
<Loader2 className="h-8 w-8 animate-spin text-primary" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gradient-to-b from-background to-muted/20 flex items-center justify-center p-4">
|
||||
<div className="absolute top-4 right-4">
|
||||
|
|
|
@ -6,7 +6,7 @@ import { Badge } from '@/components/ui/badge';
|
|||
import { Button } from '@/components/ui/button';
|
||||
import { Alert, AlertDescription } from '@/components/ui/alert';
|
||||
import { PricingSection } from '@/components/home/sections/pricing-section';
|
||||
import { AlertTriangle, Clock, CreditCard, LogOut } from 'lucide-react';
|
||||
import { AlertTriangle, Clock, CreditCard, Loader2, LogOut } from 'lucide-react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { apiClient, backendApi } from '@/lib/api-client';
|
||||
import { Skeleton } from '@/components/ui/skeleton';
|
||||
|
@ -62,7 +62,22 @@ export default function SubscriptionRequiredPage() {
|
|||
router.push('/auth');
|
||||
};
|
||||
|
||||
const isLoading = isCheckingStatus || maintenanceLoading;
|
||||
const isMaintenanceLoading = maintenanceLoading;
|
||||
|
||||
if (isMaintenanceLoading) {
|
||||
return (
|
||||
<div className="min-h-screen bg-gradient-to-b from-background to-muted/20 flex items-center justify-center p-4">
|
||||
<Loader2 className="h-8 w-8 animate-spin text-primary" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (maintenanceNotice?.enabled) {
|
||||
return <MaintenanceAlert open={true} onOpenChange={() => {}} closeable={false} />;
|
||||
}
|
||||
|
||||
|
||||
const isLoading = isCheckingStatus;
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
|
@ -84,10 +99,6 @@ export default function SubscriptionRequiredPage() {
|
|||
);
|
||||
}
|
||||
|
||||
if (maintenanceNotice?.enabled) {
|
||||
return <MaintenanceAlert open={true} onOpenChange={() => {}} closeable={false} />;
|
||||
}
|
||||
|
||||
const isTrialExpired = billingStatus?.trial_status === 'expired' ||
|
||||
billingStatus?.trial_status === 'cancelled' ||
|
||||
billingStatus?.trial_status === 'used';
|
||||
|
|
Loading…
Reference in New Issue