Skip to content

Commit

Permalink
fixed number bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhi-mylavarapu committed Oct 25, 2024
1 parent b92feb4 commit 651aca3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/containers/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,16 @@ export default defineComponent({
},
year(): number {
// Get the last element in the rosters array
const year = rosters[rosters.length - 1];
const lastElement = rosters[rosters.length - 1];
// Extract the last two digits of the year (e.g., '24' for '2024')
const yearSuffix = lastElement.slice(2);
// Log the determined year for testing
// console.log(`Determined year: ${yearSuffix}`);
// Return the year suffix as a number
return parseInt(year, 10);
return parseInt(yearSuffix, 10) + 2000;
},
userName(): FirestoreUserName {
return store.state.userName;
Expand Down

0 comments on commit 651aca3

Please sign in to comment.