- Replaced pushState with replaceState - Fixed issue that caused problems navigating to album's favorites page
This commit is contained in:
parent
85a8dbedb0
commit
df973c3992
|
@ -71,7 +71,7 @@ function AlbumPage({ match }) {
|
||||||
history.replaceState(
|
history.replaceState(
|
||||||
{},
|
{},
|
||||||
'',
|
'',
|
||||||
'/album/' + albumId + (onlyFavorites ? '/favorites' : '')
|
'/album/' + albumId + (newState ? '/favorites' : '')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ class PhotosPage extends Component {
|
||||||
|
|
||||||
favoritesCheckboxClick(refetch) {
|
favoritesCheckboxClick(refetch) {
|
||||||
const onlyWithFavorites = !this.state.onlyWithFavorites
|
const onlyWithFavorites = !this.state.onlyWithFavorites
|
||||||
history.pushState(
|
history.replaceState(
|
||||||
{},
|
{},
|
||||||
'',
|
'',
|
||||||
'/photos' + (onlyWithFavorites ? '/favorites' : '')
|
'/photos' + (onlyWithFavorites ? '/favorites' : '')
|
||||||
|
|
Loading…
Reference in New Issue