Skip to content

Commit 44385d5

Browse files
committed
Fix XP calculation and add commas for thousand separators
1 parent 2cce71f commit 44385d5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-app",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve",

src/components/TodoList.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
22
<div class="todo-app">
3-
<p>Level: {{ levels }}</p>
4-
<p>XP: {{ xps }}</p>
3+
<p>Level: {{ levels.toLocaleString("en-US") }}</p>
4+
<p>XP: {{ xps.toLocaleString("en-US") }}</p>
55
<!--show circular progress bar filled with level progress--><ve-progress
66
:progress="progresses"
7-
>Level {{ levels }}</ve-progress
7+
>Level {{ levels.toLocaleString("en-US") }}</ve-progress
88
>
99
<h3>Task list</h3>
1010
<ul class="todos">

src/store/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ export default createStore({
282282
/**
283283
* Action to complete the task.
284284
*/
285-
context.commit("complete_Todo", payload);
286285
context.commit("updateXp", payload);
286+
context.commit("complete_Todo", payload);
287287
},
288288
deleteTask: (context, payload) => {
289289
/**

0 commit comments

Comments
 (0)