You need to add a graphql query to every page like this
viktormoskalev07 opened this issue · 3 comments
I am using Strapi , so i don't have any json files for translations in my project , how can i switch off that message?
wrapPageElement.js:114
No translations were found in "locales" key for "/team/".
You need to add a graphql query to every page like this:
export const query = graphql`
query($language: String!) {
locales: allLocale(language: {eq: $language}) {
edges {
node {
ns
data
language
}
}
}
}
Add this line at the top of the file
import { graphql } from "gatsby";
I spent hours debugging to find this out!!
Add this line at the top of the file
import { graphql } from "gatsby";
I spent hours debugging to find this out!!
Which file do you mean I receive this error on every page , Even if I don’t have any requests
Add this line at the top of the file
import { graphql } from "gatsby";
I spent hours debugging to find this out!!
Which file do you mean I receive this error on every page , Even if I don’t have any requests
On each page you use graphql
like this
export const query = graphql`
query($language: String!) {
locales: allLocale(language: {eq: $language}) {
edges {
node {
ns
data
language
}
}
}
}