๐Ÿšจ ๊ฒฝ๊ณ  ํ•ด๊ฒฐ or ๋ฏธํ•ด๊ฒฐ

๋ฐ•์ƒ์€ยท2022๋…„ 4์›” 30์ผ
0

โœ๏ธ blelog โœ๏ธ

๋ชฉ๋ก ๋ณด๊ธฐ
4/13

1. Warning: Received true for a non-boolean attribute inline. If you want to write it to the DOM, pass a string instead: inline="true" or inline={value.toString()}.

์ด์ „์— ๋‹ค๋ฅธ ํ”„๋กœ์ ํŠธ๋ฅผ ํ•  ๋•Œ๋„ styled-components๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด์„œ ๊ฒฝ๊ณ ๊ฐ€ ๋ฐœ์ƒํ–ˆ์—ˆ์Šต๋‹ˆ๋‹ค.
๊ทธ๋•Œ๋Š” ์—ฌ๊ธฐ๋ฅผ ๋ณด๊ณ  prefix๋กœ $๋ฅผ ์ฃผ๋Š” ๊ฒƒ์œผ๋กœ ํ•ด๊ฒฐํ–ˆ์—ˆ๋Š”๋ฐ ์ด๋ฒˆ์—๋Š” ์—๋Ÿฌ ๋ฌธ๊ตฌ ์ œ๋Œ€๋กœ ์ฝ์–ด๋ณด๊ณ  react-markdown์œผ๋กœ ์ฒ˜๋ฆฌํ•œ ๊ตฌ๋ฌธ์—์„œ ์ปค์Šคํ„ฐ๋งˆ์ด์ง•ํ•  ๋•Œ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค๊ณ  ํŒ๋‹จํ•ด์„œ ํ•˜๋‚˜ํ•˜๋‚˜ ๋ณ€๊ฒฝํ•˜๋ฉด์„œ ์‹คํ—˜ํ•ด๋ณด๋ฉด์„œ ๊ฒฝ๊ณ ๋ฅผ ์ œ๊ฑฐํ–ˆ์Šต๋‹ˆ๋‹ค.

// ๊ฒฝ๊ณ ๊ฐ€ ์ผ์–ด๋‚˜๋Š” ๋ถ€๋ถ„๋งŒ ๊ฐ€์ ธ์™”์Šต๋‹ˆ๋‹ค.
// code์—์„œ inline์„ ์ œ์™ธ์‹œํ‚ค๊ณ  props๋กœ ๋„ฃ์–ด์ฃผ๋‹ˆ ๊ฒฝ๊ณ ๊ฐ€ ์‚ฌ๋ผ์กŒ์Šต๋‹ˆ๋‹ค.
<ReactMarkdown
  className="py-4 px-8 prose dark:prose-invert whitespace-normal max-w-full"
  remarkPlugins={[remarkGfm]}
  components={{
    code: ({ node, inline, ...props }) => (
      <code
        {...props}
        className="bg-indigo-700 px-2 py-1 rounded-sm text-white after:contents before:contents group-odd:p-0 group-even:p-0 group-odd:bg-transparent group-even:bg-transparent"
      />
    ),
>
  {markdown}
</ReactMarkdown>

2. Warning: validateDOMNesting(...): <figure> cannot appear as a descendant of <p>.

react-markdown์„ ์‚ฌ์šฉํ•˜๋ฉด์„œ ๋ฐœ์ƒํ•œ ๊ฒฝ๊ณ ์ž…๋‹ˆ๋‹ค.
react-markdown์—์„œ ์ด๋ฏธ์ง€๋ฅผ ์ฒ˜๋ฆฌํ•  ๋•Œ ์ž๋™์œผ๋กœ <p>์— ๋„ฃ์–ด์„œ ์ฒ˜๋ฆฌํ•ด์ฃผ๋Š”๋ฐ ์ด๋ฏธ์ง€๋Š” <figure>๋‚ด๋ถ€์—์„œ ๊ทธ๋ ค์ ธ์„œ ์ž๋™์œผ๋กœ <p>๋‚ด๋ถ€์— <figure>์ด ๋“ค์–ด๊ฐ€์„œ ๋ฐœ์ƒํ•˜๋Š” ๊ฒฝ๊ณ ์ž…๋‹ˆ๋‹ค.
ํ˜„์žฌ๋Š” ์–ด๋–ป๊ฒŒ ํ•ด๊ฒฐํ• ์ง€ ๋– ์˜ค๋ฅด์ง€ ์•Š์•„์„œ ์ผ๋‹จ์€ ๊ธฐ๋ก๋งŒ ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

3. Warning: Prop d did not match.

ํ‘์ƒ‰ํ™”๋ฉด์œผ๋กœ ์‹œ์ž‘ํ•  ๊ฒฝ์šฐ ์•„์ด์ฝ˜์ด ์ฆ‰์‹œ ๋ณ€ํ•˜์ง€ ์•Š๊ณ  ๊ฒฝ๊ณ ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

์ถ”์ธก์œผ๋กœ๋Š” Next.js๋Š” ๋ฏธ๋ฆฌ html์„ ๋งŒ๋“ค๊ธฐ ๋•Œ๋ฌธ์— localstorage์— ์ €์žฅ๋œ theme๊ฐ’์„ ๋ฏธ๋ฆฌ ๋ถˆ๋Ÿฌ์˜ฌ ๋•Œ ๊ฐ’์„ ์ œ๋Œ€๋กœ ๋ถˆ๋Ÿฌ์˜ค์ง€ ๋ชปํ•ด์„œ ๊ฒฝ๊ณ ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” ๊ฒƒ์œผ๋กœ ์ƒ๊ฐ๋ฉ๋‹ˆ๋‹ค. ( next-theme ์‚ฌ์šฉ์ค‘ )

0๊ฐœ์˜ ๋Œ“๊ธ€