From 1d6ebbfd925edf37da1462527df707398e5d3b56 Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Date: Sat, 2 Aug 2025 20:22:16 -0400 Subject: [PATCH] feat(user-data): Added loading optimization to user-data page --- src/App.js | 5 ++++- src/components/app-body/nfts-for-sale/index.js | 2 +- src/components/app-body/nfts-for-sale/info-button.js | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/App.js b/src/App.js index f768cce..579c5a0 100644 --- a/src/App.js +++ b/src/App.js @@ -14,7 +14,10 @@ import NavMenu from './components/nav-menu' import useAppState from './hooks/state' import { UninitializedView, InitializedView } from './components/starter-views' -const sigleViewPaths = ['/profile'] +// Paths with custom async loader +// Single Views, load minimal async services in order to prevent the long-time screen loader. +const sigleViewPaths = ['/profile', 'user-data'] + function App (props) { // Load all the app state into a single object that can be passed to child // components. diff --git a/src/components/app-body/nfts-for-sale/index.js b/src/components/app-body/nfts-for-sale/index.js index 0897fc1..9633ce0 100644 --- a/src/components/app-body/nfts-for-sale/index.js +++ b/src/components/app-body/nfts-for-sale/index.js @@ -172,7 +172,7 @@ function NftsForSale (props) { } catch (error) { setIconsAreLoaded(true) } - }, [fetchTokenMutableData, appData]) + }, [fetchTokenMutableData]) // Check if token data exists in the cache and add it to the tokens object. const reviewNftCachedData = useCallback(async (offers) => { diff --git a/src/components/app-body/nfts-for-sale/info-button.js b/src/components/app-body/nfts-for-sale/info-button.js index 99341af..c507b0a 100644 --- a/src/components/app-body/nfts-for-sale/info-button.js +++ b/src/components/app-body/nfts-for-sale/info-button.js @@ -102,7 +102,7 @@ function InfoButton (props) { User Data: