Commit cb893d9094958e367034b661d1723f99d10eb677

Authored by Paul Savignano
1 parent a5b247a920
Exists in master

Refactor hrefs to remove page load behavior.

Showing 1 changed file with 7 additions and 11 deletions   Show diff stats
imports/ui/pages/Documents.js
1 1 import React from 'react';
2   -import { browserHistory } from 'react-router';
  2 +import { Link } from 'react-router';
3 3 import { Row, Col, Button } from 'react-bootstrap';
4 4 import DocumentsList from '../containers/DocumentsList.js';
5 5  
6   -const buttonNav = (event) => {
7   - event.preventDefault();
8   - browserHistory.push('/documents/new');
9   -}
10   -
11 6 const Documents = () => (
12 7 <div className="Documents">
13 8 <Row>
14 9 <Col xs={ 12 }>
15 10 <div className="page-header clearfix">
16 11 <h4 className="pull-left">Documents</h4>
17   - <Button
18   - bsStyle="success"
19   - className="pull-right"
20   - onClick={ buttonNav }
21   - >New Document</Button>
  12 + <Link to="/documents/new">
  13 + <Button
  14 + bsStyle="success"
  15 + className="pull-right"
  16 + >New Document</Button>
  17 + </Link>
22 18 </div>
23 19 <DocumentsList />
24 20 </Col>
... ...