add loading model on initial load

This commit is contained in:
fmtabbara
2023-10-24 11:28:33 +01:00
parent 7cafd25036
commit 4533834177
2 changed files with 125 additions and 15 deletions
+116 -5
View File
@@ -419,6 +419,29 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "845141a4fade3f790628b7daaaa298a25b204fb28907eb54febe5142db6ce653"
[[package]]
name = "boringtun"
version = "0.6.0"
source = "git+https://github.com/cloudflare/boringtun?rev=e1d6360d6ab4529fc942a078e4c54df107abe2ba#e1d6360d6ab4529fc942a078e4c54df107abe2ba"
dependencies = [
"aead",
"base64 0.13.1",
"blake2 0.10.6",
"chacha20poly1305",
"hex",
"hmac 0.12.1",
"ip_network",
"ip_network_table",
"libc",
"nix",
"parking_lot",
"rand_core 0.6.4",
"ring",
"tracing",
"untrusted 0.9.0",
"x25519-dalek 2.0.0",
]
[[package]]
name = "brotli"
version = "3.3.4"
@@ -593,6 +616,30 @@ dependencies = [
"keystream",
]
[[package]]
name = "chacha20"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818"
dependencies = [
"cfg-if",
"cipher 0.4.4",
"cpufeatures",
]
[[package]]
name = "chacha20poly1305"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35"
dependencies = [
"aead",
"chacha20",
"cipher 0.4.4",
"poly1305",
"zeroize",
]
[[package]]
name = "cipher"
version = "0.3.0"
@@ -610,6 +657,7 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
dependencies = [
"crypto-common",
"inout",
"zeroize",
]
[[package]]
@@ -2688,6 +2736,28 @@ dependencies = [
"cfg-if",
]
[[package]]
name = "ip_network"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1"
[[package]]
name = "ip_network_table"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4099b7cfc5c5e2fe8c5edf3f6f7adf7a714c9cc697534f63a5a5da30397cb2c0"
dependencies = [
"ip_network",
"ip_network_table-deps-treebitmap",
]
[[package]]
name = "ip_network_table-deps-treebitmap"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e537132deb99c0eb4b752f0346b6a836200eaaa3516dd7e5514b63930a09e5d"
[[package]]
name = "ipnet"
version = "2.8.0"
@@ -3098,6 +3168,18 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
[[package]]
name = "nix"
version = "0.25.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4"
dependencies = [
"autocfg",
"bitflags 1.3.2",
"cfg-if",
"libc",
]
[[package]]
name = "nodrop"
version = "0.1.14"
@@ -3428,11 +3510,11 @@ dependencies = [
"base64 0.21.4",
"nym-bin-common",
"nym-crypto",
"nym-wireguard-types",
"schemars",
"serde",
"serde_json",
"thiserror",
"x25519-dalek 2.0.0",
]
[[package]]
@@ -3484,7 +3566,6 @@ dependencies = [
"base64 0.21.4",
"cosmrs",
"cosmwasm-std",
"dashmap",
"eyre",
"hmac 0.12.1",
"itertools 0.11.0",
@@ -3602,6 +3683,19 @@ dependencies = [
"ts-rs",
]
[[package]]
name = "nym-wireguard-types"
version = "0.1.0"
dependencies = [
"base64 0.21.4",
"boringtun",
"dashmap",
"nym-crypto",
"serde",
"thiserror",
"x25519-dalek 2.0.0",
]
[[package]]
name = "nym_wallet"
version = "1.2.9"
@@ -4162,6 +4256,17 @@ dependencies = [
"miniz_oxide",
]
[[package]]
name = "poly1305"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf"
dependencies = [
"cpufeatures",
"opaque-debug 0.3.0",
"universal-hash",
]
[[package]]
name = "polyval"
version = "0.6.1"
@@ -4576,7 +4681,7 @@ dependencies = [
"libc",
"once_cell",
"spin",
"untrusted",
"untrusted 0.7.1",
"web-sys",
"winapi",
]
@@ -4723,7 +4828,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce"
dependencies = [
"ring",
"untrusted",
"untrusted 0.7.1",
]
[[package]]
@@ -6082,6 +6187,12 @@ version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
[[package]]
name = "untrusted"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "url"
version = "2.4.0"
@@ -6343,7 +6454,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea"
dependencies = [
"ring",
"untrusted",
"untrusted 0.7.1",
]
[[package]]
+9 -10
View File
@@ -302,16 +302,15 @@ export const Delegation: FC<{ isStorybook?: boolean }> = ({ isStorybook }) => {
};
const delegationsComponent = (delegationItems: TDelegations | undefined) => {
if (delegationItems && Boolean(delegationItems?.length)) {
return (
<DelegationList
explorerUrl={urls(network).networkExplorer}
isLoading={isLoading && !isActionModalOpen}
items={delegationItems}
onItemActionClick={handleDelegationItemActionClick}
/>
);
}
return (
<DelegationList
explorerUrl={urls(network).networkExplorer}
isLoading={isLoading && !isActionModalOpen}
items={delegationItems || []}
onItemActionClick={handleDelegationItemActionClick}
/>
);
return (
<Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'flex-end' }}>
<Box marginRight={3} width={1}>