Skip to content

Commit

Permalink
Final touches
Browse files Browse the repository at this point in the history
  • Loading branch information
lindlof committed Dec 13, 2020
1 parent e09d089 commit 34e1e17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const routeUrl = (
if (client && joinLocator) {
setTimeout(() => {
playGame(client, config.contract, true, setGame, loadGame, enqueueSnackbar, joinLocator);
}, 500);
}, 0);
window.history.pushState('', '', document.location.origin);
}
};
Expand Down
2 changes: 1 addition & 1 deletion web/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const useLocalStorage = <T>(
});
const setValue = (value: T | Function, store: boolean = true) => {
try {
setStoredValue((current: T) => {
setStoredValue((current: T | Function) => {
const valueToStore = value instanceof Function ? value(current) : value;
if (store) {
window.localStorage.setItem(key, JSON.stringify(valueToStore));
Expand Down

0 comments on commit 34e1e17

Please sign in to comment.