1
1
mirror of https://github.com/jxnblk/mdx-deck.git synced 2024-11-26 00:35:02 +03:00

Adjust query params

This commit is contained in:
Brent Jackson 2018-08-02 21:58:21 -04:00
parent 4ee0ef190b
commit df92e5e651

View File

@ -136,9 +136,8 @@ export class SlideDeck extends React.Component {
return
}
const { index, mode } = this.state
let query = ''
let query = '?'
if (mode === modes.presenter) query += 'presenter'
query = query ? '?' + query : ''
history.pushState(null, null, query + '#' + index)
localStorage.setItem('mdx-slide', index)
}