LoginSignup
1
0

Warning: Failed prop type: Invalid prop `children` supplied to `ForwardRef(Box)`, expected a ReactNode.

Last updated at Posted at 2024-03-21

error

Warning: Failed prop type: Invalid prop `children` supplied to `ForwardRef(Box)`, expected a ReactNode.

code

t.rich('0012', {
    sentence: (chunks) => <Typography>{chunks}</Typography>,
    // Linkを使うとエラー
    platform: (chunks) => <Link href={`/platform`}>{chunks}</Link>
})

対応

const locale = useLocale()

t.rich('0012', {
    sentence: (chunks) => <Typography>{chunks}</Typography>,
    // Linkを使うとエラー
    platform: (chunks) => <a href={`${locale}/platform`}>{chunks}</a>
})
1
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0