import React, { useCallback } from 'react'
import { Button } from 'antd'
import { Link, useHistory } from '@ttk/router'
export default  React.memo(Page)
function Page(props) {
  const history =  useHistory()
  const onClick = useCallback(
    () => {
      history.push('app-portal')
      // history.pushChildApp('app-root', props.appName)
    },
    [],
  )
  const onRouterChanger = useCallback(
    () => {
      // history.pushChildApp("app-portal", 'app-registry')
    },
    [],
  )
  return (
    <div>
      <label>404</label>

      <Button onClick={onClick}>got login</Button>
      <Button onClick={onRouterChanger}>change router</Button>
      <Link className="currstom" to={onClick} >链接跳转</Link>
      <br />
      <Link className="currstom" to="/app-root/app-login" >登录页</Link>
      <br />
      <Link className="currstom" to="/app-root/layout/app-login" >门户-登录页</Link>
    </div>
  )
}
