Skip to content

Commit

Permalink
remove unneccessary renderhook
Browse files Browse the repository at this point in the history
  • Loading branch information
bezhanSalleh committed Nov 19, 2023
1 parent 4dab053 commit 7ab3c6e
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/LanguageSwitch.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ class LanguageSwitch

protected array | Closure | null $displayOn = null;

protected string | Closure $displayOnRenderHook = 'panels::body.end';

protected array | Closure $excludes = [];

protected array | Closure $flags = [];
Expand Down Expand Up @@ -60,7 +58,7 @@ public static function boot(): void

if ($static->isDisplayOn()) {
FilamentView::registerRenderHook(
name: $static->getDisplayOnRenderHook(),
name: 'panels::body.end',
hook: fn (): string => Blade::render('@livewire(\'filament-language-switch\')')
);
}
Expand Down Expand Up @@ -92,13 +90,6 @@ public function displayOn(array | Closure $routes = null): static
return $this;
}

public function displayOnRenderHook(string | Closure $hook): static
{
$this->displayOnRenderHook = $hook;

return $this;
}

public function excludes(array | Closure $excludes): static
{
$this->excludes = $excludes;
Expand Down Expand Up @@ -153,11 +144,6 @@ public function getDisplayLocale(): string
return (string) $this->evaluate($this->displayLocale);
}

public function getDisplayOnRenderHook(): string
{
return (string) $this->evaluate($this->displayOnRenderHook);
}

public function getExcludes(): array
{
return (array) $this->evaluate($this->excludes);
Expand Down

0 comments on commit 7ab3c6e

Please sign in to comment.