diff --git a/app/Livewire/Subscription/Index.php b/app/Livewire/Subscription/Index.php index c87f7d0b6..1444187ac 100644 --- a/app/Livewire/Subscription/Index.php +++ b/app/Livewire/Subscription/Index.php @@ -15,7 +15,7 @@ class Index extends Component if (!isCloud()) { return redirect(RouteServiceProvider::HOME); } - if (data_get(currentTeam(), 'subscription')) { + if (data_get(currentTeam(), 'subscription') && isSubscriptionActive()) { return redirect()->route('subscription.show'); } $this->settings = InstanceSettings::get(); diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 023a65107..baee4ce15 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -282,7 +282,7 @@ function base_url(bool $withPort = true): string function isSubscribed() { - return auth()->user()->currentTeam()->subscription()->exists() || auth()->user()->isInstanceAdmin(); + return isSubscriptionActive() || auth()->user()->isInstanceAdmin(); } function isDev(): bool {