Code Monkey home page Code Monkey logo

nextjs-starter-prismic-multi-language's Issues

Menu Links Key Error

This example has this error.
Warning: Encountered two children with the same key, Xs5rBhEAACEAIueu. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted โ€” the behavior is unsupported and could change in a future version. in MenuLinks (at Navigation.js:23) in Navigation (at Header.js:17) in ul (at Header.js:16) in div (at Header.js:15) in header (at Header.js:7) in Header (at Layout.js:26) in Layout (at pages/index.js:19) in Homepage (at _app.js:4) in MyApp in ErrorBoundary (created by ReactDevOverlay) in ReactDevOverlay (created by Container) in Container (created by AppContainer) in AppContainer in Root

Running prismic theme doesn't work

When you run prismic theme --theme-url https://github.com/prismicio/nextjs-multi-language-site --conf prismic-configuration.js you get the error Invalid content signature for your theme.
Screenshot 2021-09-29 at 14 57 04

Also the project guide link goes to the docs homepage and not the install article

401 error when using a variable from .env.local as the accessToken value

Hi! Thanks for sharing this great starter kit! The only thing is I'm having an issue with a 401 error when I use a variable from .env.local as the accessToken value in the prismic-configuration.js

// -- Access Token if the repository is not public // Generate a token in your dashboard and configure it here if your repository is private accessToken: '',
The problem with this is that if I add my private accessToken here it will be available in the browser.
So I created a .env.local file with my accessToken in it and added it to the prismic-configuration.js this way instead:

// -- Access Token if the repository is not public // Generate a token in your dashboard and configure it here if your repository is private accessToken: 'process.env.PRISMIC_API_TOKEN',
But I'm getting this error:
GET https://my-website.cdn.prismic.io/api/v2 401

Also to note that the error is gone when I prefix my .env.local variable with NEXT_PUBLIC_
https://nextjs.org/docs/basic-features/environment-variables#exposing-environment-variables-to-the-browser

Confirming that the accessToken is needed in the browser for the code to work. I found that the Client function which needs the accessToken is being called from homepageToolbarDocs and pageToolbarDocs and both are used inside their respective components causing the error. I'm not sure but maybe there is another way to update the prismic toolbar?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.