@silentswap/react 0.0.47 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -117,7 +117,12 @@ export const OrdersProvider = ({ children, baseUrl: baseUrlProp }) => {
|
|
|
117
117
|
// Skip if baseUrl not available (e.g., during SSR)
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
|
-
|
|
120
|
+
// Only show loading state if we don't have any orders cached (first load)
|
|
121
|
+
// This prevents showing skeletons when navigating between orders - we keep existing data visible
|
|
122
|
+
const isInitialLoad = orders.length === 0;
|
|
123
|
+
if (isInitialLoad) {
|
|
124
|
+
setLoading(true);
|
|
125
|
+
}
|
|
121
126
|
try {
|
|
122
127
|
const a_all_orders = [];
|
|
123
128
|
// Fetch orders for each facilitator group
|
|
@@ -148,9 +153,11 @@ export const OrdersProvider = ({ children, baseUrl: baseUrlProp }) => {
|
|
|
148
153
|
console.error('Failed to load orders:', error);
|
|
149
154
|
}
|
|
150
155
|
finally {
|
|
151
|
-
|
|
156
|
+
if (isInitialLoad) {
|
|
157
|
+
setLoading(false);
|
|
158
|
+
}
|
|
152
159
|
}
|
|
153
|
-
}, [facilitator_group_authorize_order_view, request_recent_orders]);
|
|
160
|
+
}, [facilitator_group_authorize_order_view, request_recent_orders, orders.length]);
|
|
154
161
|
// Store loadOrders in a ref to avoid dependency issues
|
|
155
162
|
const loadOrdersRef = useRef(loadOrders);
|
|
156
163
|
useEffect(() => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silentswap/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.48",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@ensdomains/ensjs": "^4.2.0",
|
|
26
|
-
"@silentswap/sdk": "0.0.
|
|
27
|
-
"@silentswap/ui-kit": "0.0.
|
|
26
|
+
"@silentswap/sdk": "0.0.48",
|
|
27
|
+
"@silentswap/ui-kit": "0.0.48",
|
|
28
28
|
"@solana/codecs-strings": "^5.1.0",
|
|
29
29
|
"@solana/kit": "^5.1.0",
|
|
30
30
|
"@solana/rpc": "^5.1.0",
|