From 26e2b95be1c156eb820337d397f6bd0cee0ca014 Mon Sep 17 00:00:00 2001 From: Joel Butcher Date: Sat, 7 Oct 2023 08:07:47 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20don=E2=80=99t=20render=20socialstream=20?= =?UTF-8?q?if=20not=20enabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Filament/SocialstreamPlugin.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Filament/SocialstreamPlugin.php b/src/Filament/SocialstreamPlugin.php index 542648ad..c0439708 100644 --- a/src/Filament/SocialstreamPlugin.php +++ b/src/Filament/SocialstreamPlugin.php @@ -6,6 +6,7 @@ use Filament\Panel; use Illuminate\Support\Facades\Config; use JoelButcher\Socialstream\Features; +use JoelButcher\Socialstream\Socialstream; class SocialstreamPlugin implements Plugin { @@ -21,9 +22,10 @@ public function register(Panel $panel): void ])); $panel->renderHook('panels::auth.login.form.after', function () { - return view('components.socialstream', [ - 'errors' => session('errors')?->get('socialstream') ?? [], - ]); + return Socialstream::show()) ? + view('components.socialstream', [ + 'errors' => session('errors')?->get('socialstream') ?? [], + ]) : ''; }); }