Skip to content
This repository was archived by the owner on Aug 19, 2024. It is now read-only.

Commit 518a95e

Browse files
committed
AG-2177 React Example - allow force refresh (routing breaks)
1 parent 3debbab commit 518a95e

5 files changed

Lines changed: 9 additions & 4 deletions

File tree

config/webpack.config.examples.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@ module.exports = {
4646
},
4747
devServer: {
4848
port: 8080,
49+
historyApiFallback: true
4950
}
5051
};

src-examples/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import SimpleReduxDynamicExample from "./simpleReduxDynamicComponentExample/Simp
88

99
const SideBar = () => (
1010
<div style={{float: "left", width: 335, marginRight: 25}}>
11-
<ul className="nav nav-pills nav-stacked">
11+
<ul className="nav nav-pills">
1212
<NavItem to='/rich-grid-declarative'>Rich Grid with Declarative Markup</NavItem>
1313
<NavItem to='/simple-redux-dynamic'>Simple Redux Dynamic Component Example</NavItem>
1414
</ul>

src-examples/NavItem.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {Link, Route} from 'react-router-dom'
66
export default function NavItem({children, to, exact}) {
77
return (
88
<Route path={to} exact={exact} children={({match}) => (
9-
<li className={match ? 'active' : null}>
10-
<Link to={to}>{children}</Link>
9+
<li className="nav-item">
10+
<Link className={match ? 'nav-link active' : 'nav-link'} to={to}>{children}</Link>
1111
</li>
1212
)}/>
1313
)

src-examples/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
line-height: 1
1717
}
1818

19+
h1 {
20+
font-size: 1.5rem;
21+
}
22+
1923
div.card-body > a {
2024
margin-top: 5px
2125
}

src-examples/richGridDeclarativeExample/RichGridDeclarativeExample.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export default class RichGridDeclarativeExample extends Component {
232232
</AgGridColumn>
233233
</AgGridReact>
234234
</div>
235-
<div>
235+
<div style={{marginTop: 10}}>
236236
<div className="row">
237237
<div className="col-sm-12"><h1>Rich Grid with Declarative Markup Example</h1></div>
238238
</div>

0 commit comments

Comments
 (0)