1
import React from 'react'
import { Link } from 'react-scroll'
import "./Protocol.css"
import { ANALYTICS, TRADE, USERS, TRADERS, VOTES, ZEROES } from "../../Constants"
const Protocol = () => {
    return (
        <div className="Protocol_container">
            <div className="Protocol_heading">
                {ANALYTICS}
            </div>
            <div className="Protocol_content">
                <Link>
                    <p>{ZEROES}</p>{TRADE}
                </Link>
                <Link >
                    <p>{ZEROES}</p>{USERS}
                </Link>
                <Link >
                    <p>{ZEROES}</p>{TRADERS}
                </Link>
                <Link>
                    <p>{ZEROES}</p>{VOTES}
                </Link>
            </div>

        </div>
    )
}
export default Protocol

犯错

没有重载匹配此调用。Overload 1 of 2, '(props: LinkProps | Readonly): Link',给出了以下错误。类型 '{ children: (string | Element)[]; 中缺少属性 'to' }' 但在“只读”类型中是必需的。Overload 2 of 2, '(props: LinkProps, context: any): Link',给出了以下错误。类型 '{ children: (string | Element)[]; 中缺少属性 'to' }' 但在“只读”类型中是必需的。

在此处输入图像描述

4

1 回答 1

1

链接需要 prop to="where to go",如果你想无处可去,只需使用 to="#"

于 2021-11-15T13:38:35.440 回答