Skip to content
Snippets Groups Projects
Commit fb5b9ad1 authored by Valdemar Åstorp Beere's avatar Valdemar Åstorp Beere
Browse files

refactor(format):

ran format and type check
parent 855e11f6
No related branches found
No related tags found
3 merge requests!66Final merge,!32refactor(component):,!4Pipeline fix
Pipeline #279726 failed
...@@ -307,7 +307,10 @@ const saveAnimatedState = (challenge: Challenge) => { ...@@ -307,7 +307,10 @@ const saveAnimatedState = (challenge: Challenge) => {
} }
const animateChallenge = (challenge: Challenge) => { const animateChallenge = (challenge: Challenge) => {
if (challenge.completion === 100 && !animatedChallenges.value.includes(<number>challenge.id)) { if (
challenge.completion === 100 &&
!animatedChallenges.value.includes(challenge.id as number)
) {
console.log('Animating for:', challenge.title) console.log('Animating for:', challenge.title)
if (challenge.id != null) { if (challenge.id != null) {
animatedChallenges.value.push(challenge.id) animatedChallenges.value.push(challenge.id)
...@@ -333,8 +336,8 @@ watch( ...@@ -333,8 +336,8 @@ watch(
//wait for 300ms before animating maybe? //wait for 300ms before animating maybe?
nextTick(() => { nextTick(() => {
if (challenge.completion === 100) { if (challenge.completion === 100) {
if (!animatedChallenges.value.includes(<number>challenge.id)) { if (!animatedChallenges.value.includes(challenge.id as number)) {
console.log(!animatedChallenges.value.includes(<number>challenge.id)) console.log(!animatedChallenges.value.includes(challenge.id as number))
console.log('Animating challenge in watcher:', challenge.id) console.log('Animating challenge in watcher:', challenge.id)
animateChallenge(challenge) animateChallenge(challenge)
saveAnimatedState(challenge) // Refactor this to update localStorage correctly saveAnimatedState(challenge) // Refactor this to update localStorage correctly
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment