link the store to shipEdit

docks66-json-schema
Yanick Champoux 2023-04-15 16:53:53 -04:00
parent 32ac4510b9
commit da4b5b318e
2 changed files with 13 additions and 2 deletions

View File

@ -18,7 +18,9 @@ import { fireconsDux } from "./ship/weaponry/firecons";
import { adfcDux } from "./ship/weaponry/adfc";
import { weaponsDux } from "./ship/weaponry/weapons";
process.env.UPDEEP_MODE = "dangerously_never_freeze";
if (typeof process !== "undefined") {
process.env.UPDEEP_MODE = "dangerously_never_freeze";
}
const structure = new Updux({
initialState: {},

View File

@ -1,5 +1,14 @@
<ShipEdit />
<ShipEdit {...ship} />
<script>
import { getContext } from "svelte";
import ShipEdit from "$lib/components/ShipEdit.svelte";
export let api = getContext("api");
let ship = {};
api.subscribe(() => {
ship = api.getState();
});
</script>