Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/routes/$chainSlug/_layout/address/$addressAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function AddressRoute() {
const { chainId, address: userAddress } = useUserStore();
const { addressAddress } = Route.useParams();
const {
data: address,
data: account,
Comment thread
ErwanDecoster marked this conversation as resolved.
isLoading,
isRefetching,
isError,
Expand Down Expand Up @@ -119,16 +119,16 @@ function AddressRoute() {
}
}, [userAddress, addressAddress, fromMyActivity, navigate, chainSlug]);

const addressDetails = address ? buildAddressDetails({ address }) : undefined;
const addressOverview = address
? buildAddressOverview({ address })
const addressDetails = buildAddressDetails({ address: account });
Comment thread
ErwanDecoster marked this conversation as resolved.
Outdated
const addressOverview = account
? buildAddressOverview({ address: account })
: undefined;

if (!isValid) {
return <ErrorAlert className="my-16" message="Invalid address." />;
}

if (isError && error && address === null) {
if (isError && error && account === null) {
return (
<ErrorAlert className="my-16" message="No data found for this address." />
);
Expand All @@ -142,7 +142,7 @@ function AddressRoute() {
<h1 className="flex items-center gap-2 font-sans text-2xl font-extrabold">
<AddressIcon size={24} />
Address details
{!address && isError && (
{!account && isError && (
<span className="text-muted-foreground text-sm font-light">
(outdated)
</span>
Expand All @@ -160,7 +160,7 @@ function AddressRoute() {

<AddressTabsContent
addressAddress={addressAddress}
address={addressDetails}
address={account ?? undefined}
addressDetails={addressDetails}
addressOverview={addressOverview}
hasPastError={hasPastError}
Expand Down
Loading