UNPKG

stackpress

Version:

Incept is a content management framework.

20 lines (19 loc) 1.28 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useEffect } from 'react'; import NotifyContainer from '../notify/NotifyContainer.js'; import { unload } from '../notify/hooks.js'; import { useTheme } from '../theme/hooks.js'; import { useConfig } from '../server/hooks.js'; import LayoutHead from './components/LayoutHead.js'; import LayoutMain from './components/LayoutMain.js'; import LayoutProvider from './LayoutProvider.js'; export function BlankApp({ head = true, children }) { const config = useConfig(); const { theme, toggle: toggleTheme } = useTheme(); return (_jsxs("div", { className: `${theme} layout-blank`, children: [head ? (_jsx(LayoutHead, { theme: theme, brand: config.path('brand.name', 'Stackpress'), base: config.path('view.base', '/'), logo: config.path('brand.icon', 'icon.png'), toggleTheme: toggleTheme })) : null, _jsx(LayoutMain, { head: head, children: children })] })); } export default function LayoutBlank(props) { const { head, data, session, request, response, children } = props; useEffect(unload, []); return (_jsxs(LayoutProvider, { data: data, session: session, request: request, response: response, children: [_jsx(BlankApp, { head: head, children: children }), _jsx(NotifyContainer, {})] })); }