xxxxxxxxxx
//process.env only work in server not in browser so it will show undefined
//to fixed it use NEXT_PUBLIC_before APi key in .env.local or .env
//this solution only work from version 9 of nextjs.
NEXT_PUBLIC_BACKEND_API="http://localhost:1337/graphql"
//secret environment like MongoURl and openAi key shouldn't be put using
//Next_PUBLIC_ else it will expose to browser and everyone can use it.
MONGO_URL=
OPENAI_API_KEY=