2023-04-22 14:37:49 +00:00
|
|
|
{#if ship}
|
|
|
|
<ShipEdit {...ship} />
|
|
|
|
{/if}
|
2023-04-14 18:24:21 +00:00
|
|
|
|
|
|
|
<script>
|
2023-04-15 20:53:53 +00:00
|
|
|
import { getContext } from "svelte";
|
|
|
|
|
2023-04-14 18:24:21 +00:00
|
|
|
import ShipEdit from "$lib/components/ShipEdit.svelte";
|
2023-04-15 20:53:53 +00:00
|
|
|
|
|
|
|
export let api = getContext("api");
|
|
|
|
|
2023-04-22 14:37:49 +00:00
|
|
|
let ship = api?.getState() ?? {};
|
2023-04-15 21:11:17 +00:00
|
|
|
api?.subscribe(() => {
|
2023-04-15 20:53:53 +00:00
|
|
|
ship = api.getState();
|
|
|
|
});
|
2023-04-14 18:24:21 +00:00
|
|
|
</script>
|