history push
This commit is contained in:
parent
008c2d3cb7
commit
c28721b1f4
@ -1,17 +1,25 @@
|
||||
import React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
import { URLs } from "../../__data__/urls";
|
||||
import { getHistory } from '@brojs/cli'
|
||||
import { getNavigationsValue } from "@brojs/cli";
|
||||
|
||||
import { URLs } from "../../__data__/urls";
|
||||
|
||||
const history = getHistory();
|
||||
|
||||
export const ProfilePage = () => {
|
||||
const handletoNav2Click = (event) => {
|
||||
event.preventDefault()
|
||||
history.push(getNavigationsValue('nav2.main'));
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>profile page</h1>
|
||||
<Link to={URLs.about.getUrl()}>go to about page</Link>
|
||||
|
||||
<div>
|
||||
<a href={getNavigationsValue('nav2.main')}>edit profile</a>
|
||||
<a onClick={handletoNav2Click} href={getNavigationsValue('nav2.main')}>edit profile</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user