Skip to content

Commit

Permalink
fix: don’t render socialstream if not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
joelbutcher authored Oct 7, 2023
1 parent fc9879e commit 26e2b95
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Filament/SocialstreamPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Filament\Panel;
use Illuminate\Support\Facades\Config;
use JoelButcher\Socialstream\Features;
use JoelButcher\Socialstream\Socialstream;

class SocialstreamPlugin implements Plugin
{
Expand All @@ -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') ?? [],
]) : '';
});
}

Expand Down

0 comments on commit 26e2b95

Please sign in to comment.