This commit is contained in:
1 parent
7957d14040
commit
3bc7da8005
1 file changed
+1
-11
@@ -1,5 +1,4 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { tick } from 'svelte';
|
|
||||||
import BedrockSignup from './BedrockSignup.svelte';
|
import BedrockSignup from './BedrockSignup.svelte';
|
||||||
import EditionSelection from './EditionSelection.svelte';
|
import EditionSelection from './EditionSelection.svelte';
|
||||||
import JavaSignup from './JavaSignup.svelte';
|
import JavaSignup from './JavaSignup.svelte';
|
||||||
@@ -18,21 +17,12 @@
|
|||||||
type Step = 'java' | 'bedrock' | null;
|
type Step = 'java' | 'bedrock' | null;
|
||||||
|
|
||||||
let step = $state<Step>(null);
|
let step = $state<Step>(null);
|
||||||
|
|
||||||
async function selectEdition(edition: 'java' | 'bedrock') {
|
|
||||||
step = edition;
|
|
||||||
|
|
||||||
if (edition === 'java') {
|
|
||||||
await tick();
|
|
||||||
document.getElementById('firstname')?.focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h1 class="text-center text-3xl lg:text-5xl">Anmeldung</h1>
|
<h1 class="text-center text-3xl lg:text-5xl">Anmeldung</h1>
|
||||||
|
|
||||||
<EditionSelection onSelect={selectEdition} selected={step} />
|
<EditionSelection onSelect={(edition) => (step = edition)} selected={step} />
|
||||||
|
|
||||||
<div class:hidden={step !== 'java'}>
|
<div class:hidden={step !== 'java'}>
|
||||||
<JavaSignup
|
<JavaSignup
|
||||||
|
|||||||
Reference in new issue
Block a user