steven-tey / precedent

An opinionated collection of components, hooks, and utilities for your Next.js project.
https://precedent.dev
MIT License
4.69k stars 409 forks source link

Received `true` for a non-boolean attribute `inline` #3

Closed yasinkavakliat closed 1 year ago

yasinkavakliat commented 1 year ago

Not sure if I'm the only one, but I've cloned your repo, change the database url to a MySQL db and swapped the GoogleProvider to the TwitterProvider and I'm getting the following error after logging in:

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()}.
    at code
    at code (webpack-internal:///./components/home/card.tsx:62:47)
    at p
    at ReactMarkdown (webpack-internal:///./node_modules/.pnpm/react-markdown@8.0.4_kzbn2opkn2327fwg5yzwzya5o4/node_modules/react-markdown/lib/react-markdown.js:90:42)
    at span
    at v (webpack-internal:///./node_modules/.pnpm/react-wrap-balancer@0.3.0_react@18.2.0/node_modules/react-wrap-balancer/dist/index.mjs:8:856)
    at div
    at div
    at div
    at VisualElementHandler (webpack-internal:///./node_modules/.pnpm/framer-motion@8.4.3_biqbaboplfbrettd7655fr4n2y/node_modules/framer-motion/dist/es/motion/utils/VisualElementHandler.mjs:8:1)
    at MotionComponent (webpack-internal:///./node_modules/.pnpm/framer-motion@8.4.3_biqbaboplfbrettd7655fr4n2y/node_modules/framer-motion/dist/es/motion/index.mjs:50:65)
    at Card (webpack-internal:///./components/home/card.tsx:17:11)
    at div
    at VisualElementHandler (webpack-internal:///./node_modules/.pnpm/framer-motion@8.4.3_biqbaboplfbrettd7655fr4n2y/node_modules/framer-motion/dist/es/motion/utils/VisualElementHandler.mjs:8:1)
    at MotionComponent (webpack-internal:///./node_modules/.pnpm/framer-motion@8.4.3_biqbaboplfbrettd7655fr4n2y/node_modules/framer-motion/dist/es/motion/index.mjs:50:65)
    at main
    at Layout (webpack-internal:///./components/layout/index.tsx:31:11)
    at Home (webpack-internal:///./pages/index.tsx:29:120)
    at main
    at L (webpack-internal:///./node_modules/.pnpm/react-wrap-balancer@0.3.0_react@18.2.0/node_modules/react-wrap-balancer/dist/index.mjs:8:764)
    at SessionProvider (webpack-internal:///./node_modules/.pnpm/next-auth@4.18.8_q76c2b4vyoegvsbrcwkfvimnai/node_modules/next-auth/react/index.js:454:24)
    at MyApp (webpack-internal:///./pages/_app.tsx:28:11)
    at PathnameContextProviderAdapter (webpack-internal:///./node_modules/.pnpm/next@13.1.1_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/shared/lib/router/adapters.js:62:11)
    at ErrorBoundary (webpack-internal:///./node_modules/.pnpm/next@13.1.1_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/@next/react-dev-overlay/dist/client.js:301:63)
    at ReactDevOverlay (webpack-internal:///./node_modules/.pnpm/next@13.1.1_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/@next/react-dev-overlay/dist/client.js:850:919)
    at Container (webpack-internal:///./node_modules/.pnpm/next@13.1.1_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/index.js:61:1)
    at AppContainer (webpack-internal:///./node_modules/.pnpm/next@13.1.1_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/index.js:171:11)
    at Root (webpack-internal:///./node_modules/.pnpm/next@13.1.1_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/index.js:346:11)

And because I'm using pnpm, I've also deleted the yarn.lock file. Everything else is correct (prisma has generated the schema und pushed to the DB and keys are correct because they work on another local app).

Any idea what that could be? As far as I could follow it, it should be somewhere in the popover.tsx or user-dropdown.tsx

steven-tey commented 1 year ago

Good catch! Looking into this rn @yasinkavakli :eye-twitch:

steven-tey commented 1 year ago

This seems to be coming from my custom ReactMarkdown component so I fixed it with this commit: https://github.com/steven-tey/precedent/commit/fc721c31afff0ce1e1457537b5c59d861a8451d7

Thanks again for the bug report!

yasinkavakliat commented 1 year ago

Thanks for the fix. I had assumed it could be there but didn't had time to look into it. Thanks for the quick fix 👍