Fix layout when changing build on homepage

pull/1/head
Made Baruna 2022-01-04 13:32:42 +07:00
parent 20682a653f
commit df3614aa5d
1 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,5 @@
<script> <script>
import { createEventDispatcher, tick } from 'svelte';
import { mdiChevronRight } from '@mdi/js'; import { mdiChevronRight } from '@mdi/js';
import { characters } from '../../data/characters'; import { characters } from '../../data/characters';
@ -6,11 +7,15 @@
import Icon from '../../components/Icon.svelte'; import Icon from '../../components/Icon.svelte';
const dispatch = createEventDispatcher();
const promoted = ['arataki_itto', 'gorou']; const promoted = ['arataki_itto', 'gorou'];
let current = 0; let current = 0;
function change(index) { async function change(index) {
current = index; current = index;
await tick();
dispatch('done');
} }
$: id = promoted[current]; $: id = promoted[current];