🐛 fix update not working

This commit is contained in:
Chase Manning 2023-10-16 19:07:27 +01:00
commit 3454013c94
3 changed files with 3 additions and 6 deletions

View file

@ -1,4 +1,4 @@
export const DEBUG_MODE = true; export const DEBUG_MODE = false;
export const PAINT_MODE = false; export const PAINT_MODE = false;
export const BLOCK_PIXEL_WIDTH = 16; export const BLOCK_PIXEL_WIDTH = 16;

View file

@ -18,6 +18,7 @@ const StyledGameboyMenu = styled.div`
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: space-evenly; justify-content: space-evenly;
background: pink;
`; `;
const colorAnimation = keyframes` const colorAnimation = keyframes`

View file

@ -20,7 +20,6 @@ import {
updateSpecificPokemon, updateSpecificPokemon,
} from "../state/gameSlice"; } from "../state/gameSlice";
import PokemonList from "./PokemonList"; import PokemonList from "./PokemonList";
import * as serviceWorkerRegistration from "../serviceWorkerRegistration";
import { DEBUG_MODE } from "../app/constants"; import { DEBUG_MODE } from "../app/constants";
import { getPokemonStats } from "../app/use-pokemon-stats"; import { getPokemonStats } from "../app/use-pokemon-stats";
@ -82,10 +81,7 @@ const StartMenu = () => {
{ {
label: "Update", label: "Update",
action: () => { action: () => {
// Our app is a PWA, the service worker caches the site. window.location.href = `/?v=${Date.now()}`;
// This action should remove the cache and load it again
serviceWorkerRegistration.unregister();
window.location.reload();
}, },
}, },
...(DEBUG_MODE ...(DEBUG_MODE