Skip to content

Commit 4adf01a

Browse files
authored
fix(next): does not wrap custom views with template by default (#6379)
1 parent 1abcdf9 commit 4adf01a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/next/src/views/Root/getViewFromConfig.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const getViewFromConfig = ({
6161
} => {
6262
let ViewToRender: AdminViewComponent = null
6363
let templateClassName: string
64-
let templateType: 'default' | 'minimal' = 'minimal'
64+
let templateType: 'default' | 'minimal' | undefined
6565

6666
const initPageOptions: Parameters<typeof initPage>[0] = {
6767
config,

packages/next/src/views/Root/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export const RootPage = async ({
8686

8787
return (
8888
<Fragment>
89+
{!templateType && <Fragment>{RenderedView}</Fragment>}
8990
{templateType === 'minimal' && (
9091
<MinimalTemplate className={templateClassName}>{RenderedView}</MinimalTemplate>
9192
)}

0 commit comments

Comments
 (0)