diff --git a/Cargo.lock b/Cargo.lock
index 5d04077..7a954d8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -11,6 +11,21 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "anstream"
version = "0.6.20"
@@ -187,12 +202,36 @@ version = "1.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d07aa9a93b00c76f71bc35d598bed923f6d4f3a9ca5c24b7737ae1a292841c0"
+[[package]]
+name = "cc"
+version = "1.2.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5252b3d2648e5eedbc1a6f501e3c795e07025c1e93bbf8bbdd6eef7f447a6d54"
+dependencies = [
+ "find-msvc-tools",
+ "shlex",
+]
+
[[package]]
name = "cfg-if"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9"
+[[package]]
+name = "chrono"
+version = "0.4.41"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "wasm-bindgen",
+ "windows-link",
+]
+
[[package]]
name = "codee"
version = "0.3.2"
@@ -298,6 +337,23 @@ dependencies = [
"unicode-segmentation",
]
+[[package]]
+name = "cookie"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747"
+dependencies = [
+ "percent-encoding",
+ "time",
+ "version_check",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+
[[package]]
name = "cpufeatures"
version = "0.2.17"
@@ -323,6 +379,41 @@ dependencies = [
"typenum",
]
+[[package]]
+name = "darling"
+version = "0.20.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee"
+dependencies = [
+ "darling_core",
+ "darling_macro",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.20.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e"
+dependencies = [
+ "fnv",
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim",
+ "syn",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.20.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
+dependencies = [
+ "darling_core",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "dashmap"
version = "6.1.0"
@@ -337,6 +428,27 @@ dependencies = [
"parking_lot_core",
]
+[[package]]
+name = "default-struct-builder"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0df63c21a4383f94bd5388564829423f35c316aed85dc4f8427aded372c7c0d"
+dependencies = [
+ "darling",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "deranged"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d630bccd429a5bb5a64b5e94f693bfc48c9f8566418fda4c494cc94f911f87cc"
+dependencies = [
+ "powerfmt",
+]
+
[[package]]
name = "derive-where"
version = "1.6.0"
@@ -445,6 +557,12 @@ dependencies = [
"pin-project-lite",
]
+[[package]]
+name = "find-msvc-tools"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d"
+
[[package]]
name = "fnv"
version = "1.0.7"
@@ -595,6 +713,18 @@ dependencies = [
"web-sys",
]
+[[package]]
+name = "gloo-timers"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "js-sys",
+ "wasm-bindgen",
+]
+
[[package]]
name = "gloo-utils"
version = "0.2.0"
@@ -668,6 +798,30 @@ dependencies = [
"wasm-bindgen",
]
+[[package]]
+name = "iana-time-zone"
+version = "0.1.63"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "log",
+ "wasm-bindgen",
+ "windows-core",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
[[package]]
name = "icu_collections"
version = "2.0.0"
@@ -754,6 +908,12 @@ dependencies = [
"zerovec",
]
+[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
[[package]]
name = "idna"
version = "1.0.3"
@@ -877,6 +1037,31 @@ dependencies = [
"web-sys",
]
+[[package]]
+name = "leptos-use"
+version = "0.16.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6eac17e7d306b4ad67158aba97c1490884ba304add4321069cb63fe0834c3b1"
+dependencies = [
+ "cfg-if",
+ "chrono",
+ "codee",
+ "cookie",
+ "default-struct-builder",
+ "futures-util",
+ "gloo-timers",
+ "js-sys",
+ "lazy_static",
+ "leptos",
+ "paste",
+ "send_wrapper",
+ "thiserror 2.0.16",
+ "unic-langid",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
[[package]]
name = "leptos_config"
version = "0.8.5"
@@ -1069,6 +1254,21 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
[[package]]
name = "num_cpus"
version = "1.17.0"
@@ -1201,6 +1401,12 @@ dependencies = [
"zerovec",
]
+[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
[[package]]
name = "ppv-lite86"
version = "0.2.21"
@@ -1660,6 +1866,12 @@ dependencies = [
"lazy_static",
]
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
[[package]]
name = "slab"
version = "0.4.11"
@@ -1687,6 +1899,12 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
+[[package]]
+name = "strsim"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+
[[package]]
name = "syn"
version = "2.0.106"
@@ -1835,6 +2053,36 @@ dependencies = [
"pin-project-lite",
]
+[[package]]
+name = "time"
+version = "0.3.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "83bde6f1ec10e72d583d91623c939f623002284ef622b87de38cfd546cbf2031"
+dependencies = [
+ "deranged",
+ "num-conv",
+ "powerfmt",
+ "serde",
+ "time-core",
+ "time-macros",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b"
+
+[[package]]
+name = "time-macros"
+version = "0.2.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3"
+dependencies = [
+ "num-conv",
+ "time-core",
+]
+
[[package]]
name = "tinystr"
version = "0.8.1"
@@ -1950,6 +2198,24 @@ version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
+[[package]]
+name = "unic-langid"
+version = "0.9.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a28ba52c9b05311f4f6e62d5d9d46f094bd6e84cb8df7b3ef952748d752a7d05"
+dependencies = [
+ "unic-langid-impl",
+]
+
+[[package]]
+name = "unic-langid-impl"
+version = "0.9.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dce1bf08044d4b7a94028c93786f8566047edc11110595914de93362559bc658"
+dependencies = [
+ "tinystr",
+]
+
[[package]]
name = "unicode-ident"
version = "1.0.18"
@@ -2202,12 +2468,65 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+[[package]]
+name = "windows-core"
+version = "0.61.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
+dependencies = [
+ "windows-implement",
+ "windows-interface",
+ "windows-link",
+ "windows-result",
+ "windows-strings",
+]
+
+[[package]]
+name = "windows-implement"
+version = "0.60.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "windows-interface"
+version = "0.59.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "windows-link"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
+[[package]]
+name = "windows-result"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
+dependencies = [
+ "windows-link",
+]
+
[[package]]
name = "windows-sys"
version = "0.60.2"
@@ -2366,13 +2685,15 @@ dependencies = [
[[package]]
name = "worldgen"
-version = "1.0.0"
+version = "1.2.0"
dependencies = [
+ "codee",
"console_error_panic_hook",
"getrandom",
"itertools",
"lazy_static",
"leptos",
+ "leptos-use",
"leptos_meta",
"log",
"rand",
diff --git a/Cargo.toml b/Cargo.toml
index 5bc0225..4d4d039 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "worldgen"
-version = "1.0.0"
+version = "1.2.0"
edition = "2021"
license = "MIT"
@@ -20,8 +20,10 @@ serde_json = "1.0"
wasm-bindgen = { version = "0.2", features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4"
serde-wasm-bindgen = "0.6"
-web-sys = { version = "0.3", features = ["Request", "RequestInit", "RequestMode", "Response", "Window", "Headers"] }
+web-sys = { version = "0.3", features = ["Request", "RequestInit", "RequestMode", "Response", "Window", "Headers", "Storage"] }
wasm-logger = "0.2"
+leptos-use = { version = "0.16.2", features = ["storage"] }
+codee = "0.3.2"
[[bin]]
name = "main"
diff --git a/index.html b/index.html
index dc1dd24..5d35f19 100644
--- a/index.html
+++ b/index.html
@@ -23,6 +23,8 @@
+
+
diff --git a/notes/TODO_process_trades_placement.md b/notes/TODO_process_trades_placement.md
new file mode 100644
index 0000000..5f8a8c4
--- /dev/null
+++ b/notes/TODO_process_trades_placement.md
@@ -0,0 +1,6 @@
+- Fix placement: Process Trades + Profit should be rendered after the Total row, not before
+- Re-add UI row with Process Trades + Profit in the Revenue section, after the Total span
+- Ensure Goods Profit row always renders when show_sell_price is true; investigate the blank box issue
+- Confirm Sell Qty input logic: no mutation of manifest quantities on change; only set sell_plan
+- After fixes, cargo check and run app to visually verify layout
+
diff --git a/public/css/modal.css b/public/css/modal.css
new file mode 100644
index 0000000..d4b383e
--- /dev/null
+++ b/public/css/modal.css
@@ -0,0 +1,136 @@
+:root {
+ --tg-modal-bg: #0b0f12;
+ --tg-modal-surface: #2e3136; /* neutral grey */
+ --tg-modal-border: #42474d;
+ --tg-modal-text: #edf2f7; /* light but not stark white */
+ --tg-modal-muted: #b7c0c9;
+ --tg-blue: #51A9EE;
+ --tg-blue-dark: #1976d2;
+ --tg-red: #ff5575;
+}
+
+@keyframes tg-fade-in {
+ from { opacity: 0; }
+ to { opacity: 1; }
+}
+@keyframes tg-slide-in {
+ from { opacity: 0; transform: translate(-50%, -6%); }
+ to { opacity: 1; transform: translate(-50%, 0); }
+}
+
+.tg-modal-backdrop {
+ position: fixed;
+ inset: 0;
+ background: rgba(0, 0, 0, 0.5);
+ z-index: 1000;
+ animation: tg-fade-in .18s ease-out both;
+}
+
+.tg-modal-panel {
+ position: fixed;
+ z-index: 1001;
+ left: 50%;
+ top: 15%;
+ transform: translate(-50%, 0);
+ background: var(--tg-modal-surface);
+ color: var(--tg-modal-text);
+ border: 1px solid var(--tg-modal-border);
+ padding: 16px 16px 14px 16px;
+ border-radius: 10px;
+ min-width: 380px;
+ max-width: 92vw;
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
+ animation: tg-slide-in .22s cubic-bezier(.2,.7,.2,1) both;
+}
+
+.tg-modal-textstyle {
+ margin: 0 0 .5rem 0;
+}
+.tg-modal-panel h5 {
+ margin: 0 0 12px 0;
+ color: var(--tg-blue);
+ font-weight: 700;
+ letter-spacing: .25px;
+}
+
+.tg-modal-panel .modal-body {
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+}
+
+.tg-modal-panel .modal-label {
+ font-size: 11pt;
+ color: var(--tg-modal-muted);
+ margin-top: .5rem;
+}
+
+.tg-modal-panel select,
+.tg-modal-panel input[type="number"],
+.tg-modal-panel input[type="text"] {
+ appearance: none;
+ -webkit-appearance: none;
+ background: #0e151b;
+ border: 1px solid var(--tg-modal-border);
+ color: var(--tg-modal-text);
+ border-radius: 8px;
+ padding: 8px 10px;
+ font-family: "Space Mono", monospace;
+}
+
+.tg-modal-panel select:focus,
+.tg-modal-panel input:focus {
+ outline: none;
+ border-color: var(--tg-blue);
+ box-shadow: 0 0 0 2px rgba(81,169,238,.2);
+}
+
+.tg-modal-panel input[type="number"]::-webkit-outer-spin-button,
+.tg-modal-panel input[type="number"]::-webkit-inner-spin-button {
+ -webkit-appearance: none;
+ margin: 0;
+}
+
+.tg-modal-panel .modal-actions {
+ display: flex;
+ gap: 12px;
+ justify-content: flex-end;
+ margin-top: 14px;
+}
+
+.tg-modal-error {
+ min-height: 1.2em;
+}
+
+.tg-btn {
+ font-family: inherit;
+ font-size: 10pt;
+ padding: 7px 16px;
+ cursor: pointer;
+ transition: all .15s ease;
+}
+
+.tg-btn-cancel {
+ background: transparent;
+ color: var(--tg-modal-muted);
+ border: 1px solid var(--tg-modal-border);
+ border-radius: 22px; /* match Done pill shape */
+}
+.tg-btn-cancel:hover { color: var(--tg-blue); border-color: var(--tg-blue); }
+
+.tg-btn-done {
+ background: linear-gradient(135deg, #51A9EE 0%, #1976d2 100%);
+ color: white;
+ border: 1px solid #1976d2;
+ border-radius: 22px;
+ box-shadow: 0 2px 6px rgba(0,0,0,.3);
+}
+.tg-btn-done:hover { filter: brightness(1.05); }
+.tg-btn-done:active { transform: translateY(1px); }
+
+.tg-error {
+ color: var(--tg-red);
+ font-size: 10pt;
+ margin-top: 4px;
+}
+
diff --git a/src/components/system_generator.rs b/src/components/system_generator.rs
index 8bdf49c..b23df60 100644
--- a/src/components/system_generator.rs
+++ b/src/components/system_generator.rs
@@ -184,7 +184,7 @@ fn print() {
pub fn World() -> impl IntoView {
// Initialize global context stores with default world and empty system
provide_context(Store::new(
- World::from_upp(INITIAL_NAME.to_string(), INITIAL_UPP, false, true).unwrap(),
+ World::from_upp(INITIAL_NAME, INITIAL_UPP, false, true).unwrap(),
));
provide_context(Store::new(System::default()));
@@ -206,7 +206,7 @@ pub fn World() -> impl IntoView {
debug!("Building world {name} with UPP {upp}");
// Attempt to parse the UWP string into a world object
- let Ok(mut w) = World::from_upp(name, upp.as_str(), false, true) else {
+ let Ok(mut w) = World::from_upp(&name, upp.as_str(), false, true) else {
// If parsing fails, log error and bail out to prevent crashes
log::error!("Failed to parse UWP in hook to build main world: {upp}");
return;
diff --git a/src/components/trade_computer.rs b/src/components/trade_computer.rs
index 52bf6f1..2ed67b7 100644
--- a/src/components/trade_computer.rs
+++ b/src/components/trade_computer.rs
@@ -95,7 +95,7 @@
//! ### Passenger Revenue
//! Calculates passenger income using standard Traveller rates:
//! - **High Passage**: Premium passenger service
-//! - **Medium Passage**: Standard passenger service
+//! - **Medium Passage**: Standard passenger service
//! - **Basic Passage**: Economy passenger service
//! - **Low Passage**: Cryogenic passenger transport
//!
@@ -175,34 +175,31 @@
//!
//! Includes print functionality for generating hard copies of trade data,
//! though this feature is currently disabled but available for future use.
-
+use codee::string::JsonSerdeCodec;
use leptos::prelude::*;
-use reactive_stores::Store;
+use leptos_use::storage::{
+ use_session_storage, use_session_storage_with_options, UseStorageOptions,
+};
+use std::collections::HashSet;
#[allow(unused_imports)]
-use leptos::leptos_dom::logging::console_log;
-
-use log::debug;
+use log::{debug, error};
use crate::components::traveller_map::WorldSearch;
use crate::systems::world::World;
-use crate::trade::available_goods::AvailableGoodsTable;
+
+use crate::trade::available_goods::{AvailableGood, AvailableGoodsTable};
+
use crate::trade::available_passengers::AvailablePassengers;
use crate::trade::ship_manifest::ShipManifest;
use crate::trade::table::TradeTable;
use crate::trade::ZoneClassification;
+use crate::util::Mcr;
+
use crate::INITIAL_NAME;
use crate::INITIAL_UPP;
-/// Internal type for managing sell price display state
-///
-/// Wraps a boolean flag indicating whether sell prices should be displayed
-/// in the trade goods table. Used as a reactive store type for managing
-/// the "Show Sell Price" toggle functionality.
-#[derive(Copy, Clone, Debug, PartialEq, Eq)]
-struct ShowSellPriceType(bool);
-
/// Main trade computer component providing comprehensive trading interface
///
/// Creates the complete trade calculation interface including world selection,
@@ -250,162 +247,228 @@ struct ShowSellPriceType(bool);
#[component]
pub fn Trade() -> impl IntoView {
// The main world always exists (starts with a default value) and we use that type in the context.
- provide_context(Store::new(
- World::from_upp(INITIAL_NAME.to_string(), INITIAL_UPP, false, true).unwrap(),
- ));
+ let (origin_world, write_origin_world, _) =
+ use_session_storage_with_options::(
+ "worldgen:origin_world:v1",
+ UseStorageOptions::default()
+ .initial_value(World::from_upp(INITIAL_NAME, INITIAL_UPP, false, true).unwrap()),
+ );
+
// The destination world doesn't always exist - there is valid function w/o it. So its an Option and starts as value None.
// Important to remember this as given the way Leptos_store works, this is the way you differentiate between the main world
// and the destination world in the state.
- provide_context(Store::new(None::));
- provide_context(Store::new(AvailableGoodsTable::new()));
- provide_context(Store::new(None::));
- // Used for "show sell price"
- provide_context(Store::new(ShowSellPriceType(false)));
- provide_context(Store::new(ShipManifest::default()));
-
- let origin_world = expect_context::>();
- let dest_world = expect_context::>>();
- let trade_table = TradeTable::default();
- let available_goods = expect_context::>();
- let available_passengers = expect_context::>>();
- let show_sell_price = expect_context::>();
- let ship_manifest = expect_context::>();
+
+ let (dest_world, write_dest_world, _) =
+ use_session_storage::