link the store to shipEdit
This commit is contained in:
parent
32ac4510b9
commit
da4b5b318e
@ -18,7 +18,9 @@ import { fireconsDux } from "./ship/weaponry/firecons";
|
|||||||
import { adfcDux } from "./ship/weaponry/adfc";
|
import { adfcDux } from "./ship/weaponry/adfc";
|
||||||
import { weaponsDux } from "./ship/weaponry/weapons";
|
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({
|
const structure = new Updux({
|
||||||
initialState: {},
|
initialState: {},
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
<ShipEdit />
|
<ShipEdit {...ship} />
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getContext } from "svelte";
|
||||||
|
|
||||||
import ShipEdit from "$lib/components/ShipEdit.svelte";
|
import ShipEdit from "$lib/components/ShipEdit.svelte";
|
||||||
|
|
||||||
|
export let api = getContext("api");
|
||||||
|
|
||||||
|
let ship = {};
|
||||||
|
api.subscribe(() => {
|
||||||
|
ship = api.getState();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user