martinkr/next-export-i18n

Storybook example

hobadams opened this issue · 3 comments

Hey,

When using this package alongside Storybook I get the following error:

TypeError: Cannot read properties of null (reading 'query')
    at useSelectedLanguage

The component loaded into my story uses the useSelectedLanguage hook. I get the same error using the useTranslation hook and the useSelectedLanguage hook.

I'm assuming there is an extra step needed to wrap storybook in the translation context. Have you tried this / experienced the same?

Any help would be really appreciated

Hi,

Thank you for reaching out.

Can you provide a complete code example or even better a sample repostiory so I can see the actual code?

Thank you in advance!

Hey @martinkr sorry for the slow reply. I've opted for another approach so happy to close this one. Thank you

It would be nice to integrate next-export-i18n with Storybook globals so that it's usable with Chromatic Story Modes.