Skip to content

Commit

Permalink
fix: use recommended studio embed
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Aug 17, 2023
1 parent 652351d commit 23299d2
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions src/pages/studio/[[...index]].tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
import Head from 'next/head'
import { NextStudio } from 'next-sanity/studio'
import { NextStudioHead } from 'next-sanity/studio/head'
import { StudioLayout, StudioProvider } from 'sanity'
import { metadata } from 'next-sanity/studio/metadata'
import config from 'sanity.config'
import { createGlobalStyle } from 'styled-components'

const GlobalStyle = createGlobalStyle(({ theme }) => ({
html: { backgroundColor: theme.sanity.color.base.bg },
}))

export default function StudioPage() {
return (
<>
<Head>
<NextStudioHead favicons={false} />
{Object.entries(metadata).map(([key, value]) => (
<meta key={key} name={key} content={value} />
))}
</Head>

<NextStudio config={config}>
<StudioProvider config={config}>
<GlobalStyle />
<StudioLayout />
</StudioProvider>
</NextStudio>
<NextStudio config={config} unstable_globalStyles />
</>
)
}

1 comment on commit 23299d2

@vercel
Copy link

@vercel vercel bot commented on 23299d2 Aug 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

template-nextjs-clean – ./

template-nextjs-clean-git-main.sanity.build
template-nextjs-clean.sanity.build

Please sign in to comment.