2019-03-30 22:55:48 +00:00
|
|
|
<template>
|
2019-12-03 21:26:44 +00:00
|
|
|
<div class="mt-3 flex text-center">
|
2019-12-03 20:57:52 +00:00
|
|
|
<div class="mt-4 w-3/12">
|
|
|
|
|
<SummonerChampions />
|
|
|
|
|
<SummonerStats />
|
|
|
|
|
<SummonerMates />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="w-9/12">
|
|
|
|
|
<ul>
|
|
|
|
|
<Match
|
|
|
|
|
v-for="(match, index) in summonerInfos.matches"
|
|
|
|
|
:key="index"
|
|
|
|
|
:data="summonerInfos.matches[index]"
|
|
|
|
|
/>
|
|
|
|
|
</ul>
|
|
|
|
|
<LoadingButton
|
|
|
|
|
v-if="moreMatchesToFetch"
|
|
|
|
|
@clicked="moreMatches"
|
|
|
|
|
:loading="matchesLoading"
|
|
|
|
|
btn-class="mt-4 block mx-auto bg-blue-800 px-4 py-2 rounded-md font-semibold hover:bg-blue-1000 shadow-lg"
|
|
|
|
|
>More matches</LoadingButton>
|
2019-09-14 21:19:10 +00:00
|
|
|
</div>
|
2019-03-30 22:55:48 +00:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2019-12-03 20:57:52 +00:00
|
|
|
|
2019-03-30 22:55:48 +00:00
|
|
|
<script>
|
2019-09-11 20:02:05 +00:00
|
|
|
import { mapState, mapActions, mapGetters } from 'vuex'
|
2019-10-06 13:08:24 +00:00
|
|
|
import LoadingButton from '@/components/LoadingButton.vue'
|
2019-11-03 17:49:58 +00:00
|
|
|
import Match from '@/components/Match/Match.vue'
|
2019-12-03 20:57:52 +00:00
|
|
|
import SummonerChampions from '@/components/Summoner/Overview/SummonerChampions.vue'
|
|
|
|
|
import SummonerMates from '@/components/Summoner/Overview/SummonerMates.vue'
|
|
|
|
|
import SummonerStats from '@/components/Summoner/Overview/SummonerStats.vue'
|
2019-03-30 22:55:48 +00:00
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
2019-10-06 13:08:24 +00:00
|
|
|
LoadingButton,
|
2019-04-08 20:06:22 +00:00
|
|
|
Match,
|
2019-11-24 13:26:27 +00:00
|
|
|
SummonerChampions,
|
2019-10-25 21:09:33 +00:00
|
|
|
SummonerMates,
|
2019-11-08 14:39:56 +00:00
|
|
|
SummonerStats,
|
2019-03-30 22:55:48 +00:00
|
|
|
},
|
2019-08-23 14:48:16 +00:00
|
|
|
|
2019-04-07 17:44:01 +00:00
|
|
|
computed: {
|
2019-09-08 20:08:49 +00:00
|
|
|
...mapState({
|
2019-09-14 14:10:49 +00:00
|
|
|
summonerInfos: state => state.summoner.infos
|
2019-09-11 20:02:05 +00:00
|
|
|
}),
|
2019-12-03 20:57:52 +00:00
|
|
|
...mapGetters('summoner', ['matchesLoading', 'moreMatchesToFetch'])
|
2019-08-23 14:48:16 +00:00
|
|
|
},
|
|
|
|
|
|
2019-03-30 22:55:48 +00:00
|
|
|
methods: {
|
2019-12-03 20:57:52 +00:00
|
|
|
...mapActions('summoner', ['moreMatches']),
|
2019-03-30 22:55:48 +00:00
|
|
|
}
|
2019-08-23 14:48:16 +00:00
|
|
|
}
|
2019-03-30 22:55:48 +00:00
|
|
|
</script>
|