diff options
author | Dessalines <tyhou13@gmx.com> | 2019-09-05 18:34:10 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-09-05 18:34:10 -0700 |
commit | aca2c1abecc4be7e60a190f931aab8c9be40f369 (patch) | |
tree | 133eb63881ad94294d98e749b7cf3485b9ccbf12 /ui/src/components/main.tsx | |
parent | 299285abb83dbf52491b8833ac73f28c5b437bcd (diff) |
Adding usable search urls
- Fixes #242
Diffstat (limited to 'ui/src/components/main.tsx')
-rw-r--r-- | ui/src/components/main.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx index 48df1edd..cce31fce 100644 --- a/ui/src/components/main.tsx +++ b/ui/src/components/main.tsx @@ -106,11 +106,12 @@ export class Main extends Component<any, MainState> { // Necessary for back button for some reason componentWillReceiveProps(nextProps: any) { - if (nextProps.history.action == 'POP') { + if (nextProps.history.action == 'POP' || nextProps.history.action == 'PUSH') { this.state = this.emptyState; this.state.type_ = this.getListingTypeFromProps(nextProps); this.state.sort = this.getSortTypeFromProps(nextProps); this.state.page = this.getPageFromProps(nextProps); + this.setState(this.state); this.fetchPosts(); } } |