fix panel redirection if unlog

This commit is contained in:
isUnknown 2024-10-29 11:20:31 +01:00
parent 173479eaa6
commit 20eb186c37
2 changed files with 5 additions and 8 deletions

View file

@ -1,6 +1,9 @@
<?php
return function ($page, $kirby) {
return function ($page, $kirby, $site) {
if (!$kirby->user()) {
go($site->panel()->url());
}
$data = $page->toArray();
$data['template'] = (string) $page->template();

View file

@ -1,9 +1,3 @@
<?php snippet('header') ?>
<?php
if ($kirby->user()) {
echo '<div id="app"></div>';
} else {
go($site->panel()->url());
}
?>
<div id="app"></div>
<?php snippet('footer') ?>