diff --git a/packages/frontend/src/pages/achievements.vue b/packages/frontend/src/pages/achievements.vue
index 3cec8f630f..14b8520696 100644
--- a/packages/frontend/src/pages/achievements.vue
+++ b/packages/frontend/src/pages/achievements.vue
@@ -15,7 +15,7 @@ import { definePageMetadata } from '@/scripts/page-metadata';
import { $i } from '@/account';
import { claimAchievement } from '@/scripts/achievements';
-let timer;
+let timer: number | null;
function viewAchievements3min() {
claimAchievement('viewAchievements3min');
@@ -26,8 +26,10 @@ onMounted(() => {
});
onUnmounted(() => {
- window.clearTimeout(timer);
- timer = null;
+ if (timer != null) {
+ window.clearTimeout(timer);
+ timer = null;
+ }
});
onActivated(() => {
@@ -35,8 +37,10 @@ onActivated(() => {
});
onDeactivated(() => {
- window.clearTimeout(timer);
- timer = null;
+ if (timer != null) {
+ window.clearTimeout(timer);
+ timer = null;
+ }
});
definePageMetadata({
diff --git a/packages/frontend/src/pages/user/achievements.vue b/packages/frontend/src/pages/user/achievements.vue
new file mode 100644
index 0000000000..eaea26db4a
--- /dev/null
+++ b/packages/frontend/src/pages/user/achievements.vue
@@ -0,0 +1,52 @@
+
+