react-achievements 1.3.4 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,6 +5,9 @@ A flexible and customizable achievement system for React applications, perfect f
5
5
 
6
6
  [![React Achievements](https://img.youtube.com/vi/BWdtiE53S-8/maxresdefault.jpg)](https://youtu.be/BWdtiE53S-8)
7
7
 
8
+ If you want to test the package, you can try it out here:
9
+
10
+ https://stackblitz.com/edit/vitejs-vite-sccdux
8
11
 
9
12
 
10
13
  <h2 align="center">🚀 Installation</h2>
@@ -69,42 +72,42 @@ import questMasterIcon from './icons/quest-master.png';
69
72
  const achievementConfig = {
70
73
  level: [
71
74
  {
72
- check: (value) => value >= 10,
75
+ check: (value) => value >= 1,
73
76
  data: {
74
- id: 'level_10',
77
+ id: 'level_1',
75
78
  title: 'Novice Adventurer',
76
- description: 'Reached level 10',
79
+ description: 'Reached level 1',
77
80
  icon: levelUpIcon
78
81
  }
79
82
  },
80
83
  {
81
- check: (value) => value >= 50,
84
+ check: (value) => value >= 5,
82
85
  data: {
83
- id: 'level_50',
86
+ id: 'level_5',
84
87
  title: 'Seasoned Warrior',
85
- description: 'Reached level 50',
88
+ description: 'Reached level 5',
86
89
  icon: levelUpIcon
87
90
  }
88
91
  }
89
92
  ],
90
93
  monstersDefeated: [
91
94
  {
92
- check: (value) => value >= 100,
95
+ check: (value) => value >= 10,
93
96
  data: {
94
97
  id: 'monster_slayer',
95
98
  title: 'Monster Slayer',
96
- description: 'Defeated 100 monsters',
99
+ description: 'Defeated 10 monsters',
97
100
  icon: monsterSlayerIcon
98
101
  }
99
102
  }
100
103
  ],
101
104
  questsCompleted: [
102
105
  {
103
- check: (value) => value >= 50,
106
+ check: (value) => value >= 1,
104
107
  data: {
105
108
  id: 'quest_master',
106
109
  title: 'Quest Master',
107
- description: 'Completed 50 quests',
110
+ description: 'Completed 1 quest',
108
111
  icon: questMasterIcon
109
112
  }
110
113
  }
@@ -367,7 +370,12 @@ badgesButton: {
367
370
 
368
371
  ```
369
372
 
370
- This allows you to match the achievement system's look and feel to your game or application's theme.
373
+ <h2 align="center">Resetting React Achievements</h2>
374
+
375
+ The achievements are stored in local storage. In order to reset the package in your app, you need to delete the key-value pairs in local storage:
376
+
377
+ ![Key-Value pair delete image](https://github.com/dave-b-b/react-achievements/blob/main/images/delete_local_storage.png?raw=true)
378
+
371
379
 
372
380
  <h2 align="center">📄 License</h2>
373
381
  MIT
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-achievements",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "description": "This package allows users to transpose a React achievements engine over their React apps",
5
5
  "keywords": [
6
6
  "react",