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