You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having an issue with the Visual Editor currently, trying to use the app router in Nextjs 15,
as far as I understood from your docs, there is no need for any special setup for the Visual Editor to make it work.
No matter what I do I get this screen
My current setup is also super simple:
storyblok.ts
`import SimpleText from '@/components/SimpleText';
import TextSection from '@/components/TextSection';
import { apiPlugin, storyblokInit } from '@storyblok/react/rsc';
import Page from '../components/Page';
@szabolcsveer I suggest you to open these kind of questions on our Discord community https://discord.gg/jKrbAMz, as is seems more like a setup issue than an issue with this SDK.
Describe the issue you're facing
I am having an issue with the Visual Editor currently, trying to use the app router in Nextjs 15,
as far as I understood from your docs, there is no need for any special setup for the Visual Editor to make it work.
No matter what I do I get this screen
My current setup is also super simple:
storyblok.ts
`import SimpleText from '@/components/SimpleText';
import TextSection from '@/components/TextSection';
import { apiPlugin, storyblokInit } from '@storyblok/react/rsc';
import Page from '../components/Page';
export const getStoryblokApi = storyblokInit({
accessToken: process.env.STORYBLOK_ACCESS_TOKEN,
use: [apiPlugin],
apiOptions: {
headers: 'Content-Security-Policy: frame-ancestors',
cache: {
clear: 'auto',
type: 'memory',
},
},
bridge: true,
components: {
page: Page,
'text-section': TextSection,
'simple-text': SimpleText,
},
});`
page.tsx --- in app root
`import { getStoryblokApi } from '@/lib/storyblok';
import { ISbStoriesParams, StoryblokClient } from '@storyblok/react';
import { StoryblokStory } from '@storyblok/react/rsc';
export default async function Home() {
const { data } = await fetchData();
return (
ROOT PAGE
);
}
async function fetchData() {
let sbParams: ISbStoriesParams = { version: 'draft' };
const storyblokApi: StoryblokClient = getStoryblokApi();
return storyblokApi?.get(
cdn/stories/nietzsche
, sbParams);}`
What am I doing wrong?
Your help would be appreciated.
Reproduction
no
Steps to reproduce
No response
System Info
Used Package Manager
yarn
Error logs (Optional)
No response
Validations
The text was updated successfully, but these errors were encountered: