fixed #26 + loaded matches now still loaded after visiting match

This commit is contained in:
2021-10-31 02:51:58 +01:00
committed by Giovanni Harting
parent c346dd13e8
commit 9e8c840024
2 changed files with 128 additions and 45 deletions

View File

@@ -43,11 +43,13 @@
<script>
import {GoToPlayer, SaveLastVisitedToLocalStorage, setTitle} from "../utils";
import {onBeforeMount, ref} from "vue";
import {useStore} from "vuex";
export default {
name: 'Home',
setup() {
setTitle('Home')
const store = useStore()
const recentVisited = ref([])
@@ -78,7 +80,10 @@ export default {
loadRecentVisited()
}
onBeforeMount(() => loadRecentVisited())
onBeforeMount(() => {
loadRecentVisited()
store.commit('resetPlayerDetails')
})
return {recentVisited, GoToPlayer, removeRecentVisited}
}