Skip to content

Commit

Permalink
fix: make localStorage key more unique
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Jun 2, 2024
1 parent e82260c commit efb7f0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/constants/game.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export const GAME_ID = `${import.meta.env.VITE_APP_NAME}-${typeof crypto?.randomUUID == 'function' ? crypto.randomUUID() : Date.now()}`
const GAME_NAME = import.meta.env.VITE_APP_NAME

export const GAME_ID = `${GAME_NAME}-${typeof crypto?.randomUUID == 'function' ? crypto.randomUUID() : Date.now()}`
4 changes: 3 additions & 1 deletion src/types/data.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const prefix = 'remarkablegames.code-arcade'

export enum Data {
level = 'level',
level = `${prefix}.level`,
}

0 comments on commit efb7f0a

Please sign in to comment.