Nextjs jump transfer parameter

problem description

nextjs is clicked with parameters to jump to the next page. If you want to get the passed value on the next page, for example, the index.js under the Pages page in react clicks a value with a value, and the offer.js, under Pages wants to get the passed value under offer.js.
pages are all this kind of template

.
import React, { Component} from "react";
export default class Index extends Component{
    render(){
        
    }
}

such a form,

import React, { Component} from "react";
export default class Offer extends Component{
    render(){
        
    }
}

how do I get the value passed by index on this page


you can jump on the Pages page


     import Router from 'next/router' // 
  Router.push({
    pathname: '/myStock', 
    query: { 
      state: 7,
      type:2
    }
  })

receive parameters

`router.query.id`
in index.
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-1ea938d-1f40.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-1ea938d-1f40.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?