diff --git a/src/custom/hooks/useFetchProfile.ts b/src/custom/hooks/useFetchProfile.ts index 3fa1bf141..c2d95af4e 100644 --- a/src/custom/hooks/useFetchProfile.ts +++ b/src/custom/hooks/useFetchProfile.ts @@ -22,7 +22,6 @@ export default function useFetchProfile(): FetchProfileState { const [profile, setProfile] = useState(emptyState) useEffect(() => { - setProfile({ ...emptyState, isLoading: true }) async function fetchAndSetProfileData() { try { if (chainId && account) { diff --git a/src/custom/pages/Profile/index.tsx b/src/custom/pages/Profile/index.tsx index f2cda534f..679dd331c 100644 --- a/src/custom/pages/Profile/index.tsx +++ b/src/custom/pages/Profile/index.tsx @@ -29,22 +29,20 @@ export default function Profile() { const { profileData, isLoading, error } = useFetchProfile() const lastUpdated = useTimeAgo(profileData?.lastUpdated) - const renderNotificationMessages = () => { - return ( - <> - {error && ( - - There was an error loading your profile data. Please try again later. - - )} - {chainId && chainId !== ChainId.MAINNET && ( - - Profile data is only available for mainnet. Please change the network to see it. - - )} - - ) - } + const renderNotificationMessages = ( + <> + {error && ( + + There was an error loading your profile data. Please try again later. + + )} + {chainId && chainId !== ChainId.MAINNET && ( + + Profile data is only available for mainnet. Please change the network to see it. + + )} + + ) return ( @@ -74,7 +72,7 @@ export default function Profile() { )} - {renderNotificationMessages()} + {renderNotificationMessages} Your referral url