prompt-engineering / click-prompt

ClickPrompt - Streamline your prompt design, with ClickPrompt, you can easily view, share, and run these prompts with just one click. ClickPrompt 用于一键轻松查看、分享和执行您的 Prompt。
https://www.clickprompt.org/
MIT License
2.3k stars 196 forks source link

[new feature]: navbar not working with i18n headers #78

Closed phodal closed 1 year ago

phodal commented 1 year ago

@CGQAQ

PS: I add a try catch in getAppData()

bug:

  1. open http://localhost:3000/zh-CN/chatgpt-samples/ddd-sample/
  2. console will show:
DynamicServerError: Dynamic server usage: headers
    at Object.staticGenerationBailout (webpack-internal:///(sc_server)/./node_modules/next/dist/client/components/static-generation-bailout.js:18:21)
    at headers (webpack-internal:///(sc_server)/./node_modules/next/dist/client/components/headers.js:12:39)
    at getAppData (webpack-internal:///(sc_server)/./src/i18n/index.ts:68:20)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async NavBar (webpack-internal:///(sc_server)/./src/layout/NavBar.tsx:28:34) {
  digest: 'DYNAMIC_SERVER_USAGE'
}