React-router Route Jump problem

The

code is as follows: I want to insert the content into the red box, but now I skip the page
import React from "react"
import Header from". / header/header"
import Sider from". / sider/sider";
import Content from". / content/content";
import {Route, Switch, Link} from "react-router-dom"
import {Menu, Icon, Button} from" antd";

const ProductList = function productList () {

return (
    <div>this is ProductList</div>
)

}
const ProductDetail = function productDetail () {

return (
    <div>this is ProductDetail</div>
)

}
class Dashboard extends React.Component {

render() {
    return (
        <div>
            <div>
                <Header />
            </div>
            <div className="container-fluid">
                <div className="row">
                    <div className="col-lg-2">
                        <Menu
                            defaultSelectedKeys={["1"]}
                            defaultOpenKeys={["sub1"]}
                            mode="vertical"
                            theme="light"
                        >
                            <Menu.Item key="1">
                                <Link to={"/productList"}>
                                    <Icon type="pie-chart" />
                                    <span></span>
                                </Link>
                            </Menu.Item>
                            <Menu.Item key="2">
                                <Link to={"/productDetail"}>
                                    <Icon type="pie-chart" />
                                    <span></span>
                                </Link>
                            </Menu.Item>
                        </Menu>
                    </div>
                    <div className="col-lg-10">
                        <Route path="/productList" component={ProductList}></Route>
                        <Route path="/productDetail" component={ProductDetail}></Route>
                    </div>
                </div>
            </div>
        </div>
    )
}

}

export default Dashboard

Dec.15,2021

. Use it like < Header / >. I don't know why you use router


because you don't register the route of the root node, which is path= "/", that is, the route when entering and then entering the child route

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3f1d4-2bbe5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3f1d4-2bbe5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?