Cat /dev/Nulo
3f9a2f0603
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
17 lines
444 B
Svelte
17 lines
444 B
Svelte
<script lang="ts">
|
|
import { generateNewWorld } from "../lib/doc";
|
|
import { routes } from "../lib/routes";
|
|
import { router } from "../lib/router";
|
|
import { writeWorlds } from "../lib/worldStorage";
|
|
|
|
function crear(event: Event) {
|
|
event.preventDefault();
|
|
writeWorlds((worlds) => [...worlds, generateNewWorld()]);
|
|
router.run(routes.ChooseWorld);
|
|
}
|
|
</script>
|
|
|
|
<form on:submit={crear}>
|
|
<button>Crear mundo</button>
|
|
</form>
|