diff --git a/chenxuan1/src/App.js b/chenxuan1/src/App.js index fa0453fa0..b14fd164a 100644 --- a/chenxuan1/src/App.js +++ b/chenxuan1/src/App.js @@ -6,7 +6,7 @@ */ import React,{Component} from 'react' import {NavLink,Route,Routes,Navigate,useRoutes} from 'react-router-dom' -import routes from './router'; +// import routes from './router'; import Head from "./pages/head" import './pages/style.scss' import elementArr from './router/element'; diff --git a/chenxuan1/src/pages/head.jsx b/chenxuan1/src/pages/head.jsx index 7c98bd4b6..2b518a79b 100644 --- a/chenxuan1/src/pages/head.jsx +++ b/chenxuan1/src/pages/head.jsx @@ -1,24 +1,34 @@ +import { func } from "prop-types"; import React from "react"; +import { useNavigate } from "react-router-dom"; // import {withRouter} from "react-router-dom"; -class Head extends React.Component{ - back=()=>{ - // this.props.history.goBack() +// function navigate_(){ +// const navigate=useNavigate() +// navigate('/github') +// } +export default function Head(){ + const navigate = useNavigate() + const back=()=>{ + } - forward=()=>{ - // this.props.history.goForward() + const forward=()=>{ + } - go=()=>{ - // this.props.history.go(-2) + const go=()=>{ + } - render(){ - return( -