mirror of
https://github.com/Qortal/qapp-core.git
synced 2025-06-14 01:21:21 +00:00
fix primary name retrieval
This commit is contained in:
parent
e910958b26
commit
b5d3bbdc3f
@ -2,13 +2,15 @@ import { Box, Typography } from "@mui/material";
|
||||
import { BarSpinner } from "./Spinners/BarSpinner/BarSpinner";
|
||||
import { CSSProperties } from "react";
|
||||
|
||||
export type LoaderListStatus = "LOADING" | "NO_RESULTS"
|
||||
|
||||
interface ListLoaderProps {
|
||||
isLoading: boolean;
|
||||
loadingMessage?: string; // Optional message while loading
|
||||
resultsLength: number;
|
||||
noResultsMessage?: string; // Optional message when no results
|
||||
children: React.ReactNode; // Required, to render the list content
|
||||
loaderList?: (status: "LOADING" | "NO_RESULTS") => React.ReactNode; // Function type
|
||||
loaderList?: (status: LoaderListStatus) => React.ReactNode; // Function type
|
||||
loaderHeight?: CSSProperties
|
||||
}
|
||||
|
||||
|
@ -505,7 +505,7 @@ export const ListItemWrapper: React.FC<ListItemWrapperProps> = ({
|
||||
// Example transformation (Modify item if needed)
|
||||
const transformedItem = findCachedResource
|
||||
? findCachedResource
|
||||
: { qortalMetadata: item };
|
||||
: { qortalMetadata: item, data: null };
|
||||
|
||||
return <>{render(transformedItem, index)}</>;
|
||||
};
|
||||
|
@ -63,7 +63,7 @@ const setBalance = useAuthStore((s) => s.setBalance);
|
||||
action: "GET_PRIMARY_NAME",
|
||||
address: account.address,
|
||||
});
|
||||
setUser({ ...account, name: nameData?.name || "" });
|
||||
setUser({ ...account, name: nameData || "" });
|
||||
}
|
||||
} catch (error) {
|
||||
setErrorLoadingUser(
|
||||
|
@ -27,4 +27,5 @@ export {Resource} from './hooks/useResources'
|
||||
export {Service, QortalGetMetadata} from './types/interfaces/resources'
|
||||
export {ListItem} from './state/cache'
|
||||
export {SymmetricKeys} from './utils/encryption'
|
||||
export {LoaderListStatus} from './common/ListLoader'
|
||||
|
||||
|
@ -32,7 +32,7 @@ export const mergeUniqueItems = (array1: QortalMetadata[], array2: QortalMetadat
|
||||
};
|
||||
|
||||
export interface ListItem {
|
||||
data?: any
|
||||
data: any
|
||||
qortalMetadata: QortalMetadata
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user