Note a bug

This commit is contained in:
Austin Chen 2022-05-18 10:11:23 -04:00
parent 15cfe48089
commit 0bf634e3de

View File

@ -197,6 +197,8 @@ export function UserPage(props: {
onClick={(tabName) => {
const tabId = tabName.toLowerCase()
const subpath = tabId === 'markets' ? '' : '/' + tabId
// BUG: if you start on `/Bob/bets`, then click on Markets, use-query-and-sort-params
// rewrites the url incorrectly to `/Bob/bets` instead of `/Bob`
window.history.replaceState('', '', `/${user.username}${subpath}`)
}}
tabs={[