aotds-docks/src/routes/editor/+page.svelte

17 lines
294 B
Svelte
Raw Normal View History

2023-04-23 14:53:19 +00:00
{#if ship}
<ShipEdit {...ship} />
{/if}
<script>
import { getContext } from "svelte";
import ShipEdit from "$lib/components/ShipEdit.svelte";
export let api = getContext("api");
let ship = api?.getState() ?? {};
api?.subscribe(() => {
ship = api.getState();
});
</script>