@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
12 lines • 501 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLeftAccountsModule = useLeftAccountsModule;
function useLeftAccountsModule(params, { useAccountData, accountsCount, }) {
const accountData = useAccountData(params);
return accountData.map(({ label, count }) => ({
leftElement: count > 0 ? accountsCount({ label }) : undefined,
description: count > 0 ? label : undefined,
count,
}));
}
//# sourceMappingURL=useLeftAccounts.js.map