morethanmin / morethan-log

😎 A static blog using notion database
https://morethan-log.vercel.app
MIT License
1.9k stars 1.53k forks source link

[Bug]: Utterances.tsx config build error #271

Open SEOKKAMONI opened 1 year ago

SEOKKAMONI commented 1 year ago

Describe the bug

- info Linting and checking validity of types ...Failed to compile.

./src/routes/Detail/PostDetail/CommentBox/Utterances.tsx:28:11
Type error: Type '{ repo: string | undefined; "issue-term": string; label: string; }' is not assignable to type '{ [key: string]: string; }'.
  Property 'repo' is incompatible with index signature.
    Type 'string | undefined' is not assignable to type 'string'.
      Type 'undefined' is not assignable to type 'string'.

  26 |     script.setAttribute("issue-term", issueTerm)
  27 |     script.setAttribute("theme", theme)
> 28 |     const config: { [key: string]: string } = CONFIG.utterances.config
     |           ^
  29 |     Object.keys(config).forEach((key) => {
  30 |       script.setAttribute(key, config[key])
  31 |     })
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

To reproduce

  1. Go to ...
  2. Click on ...
  3. Scroll down to ..
  4. See error

Browser

Mac

Validations