Use replaceState for better browser history

This commit is contained in:
Austin Chen 2022-05-18 09:59:04 -04:00
parent 44493d23be
commit df9668bb9d

View File

@ -197,7 +197,7 @@ export function UserPage(props: {
onClick={(tabName) => {
const tabId = tabName.toLowerCase()
const subpath = tabId === 'markets' ? '' : '/' + tabId
window.history.pushState('', '', `/${user.username}${subpath}`)
window.history.replaceState('', '', `/${user.username}${subpath}`)
}}
tabs={[
{