release: v0.15.0 (#585)
Eighteen changes since v0.14.0. See CHANGELOG.md for the full list and the upgrade notes (bump IMAGE_CACHE_VERSION).
This commit is contained in:
19
app/admin/settings/layout.tsx
Normal file
19
app/admin/settings/layout.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import SettingsEditor from '../components/SettingsEditor';
|
||||
|
||||
/**
|
||||
* The settings editor lives in the layout, not in the section pages.
|
||||
*
|
||||
* Each section is its own route, and a page remounts when the section changes.
|
||||
* With the editor in the page, switching from General to Theme threw away every
|
||||
* unsaved edit and re-read settings.yaml, without a word — the save bar simply
|
||||
* vanished. A layout stays mounted across its child routes, so the edits, and
|
||||
* the one save bar that covers them, survive the switch.
|
||||
*/
|
||||
export default function AdminSettingsLayout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<>
|
||||
<SettingsEditor />
|
||||
{children}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user