Skip to content

Commit

Permalink
temporarily remove expand row functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
radumojic committed Feb 20, 2024
1 parent e5b3dae commit 139567e
Showing 1 changed file with 2 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useGetSort } from 'hooks';
import { NodeType, SortOrderEnum, WithClassnameType } from 'types';

import { AuctionListBaseRow } from './AuctionListBaseRow';
import { AuctionListExpandRow } from './AuctionListExpandRow';
import { AuctionListTresholdRow } from './AuctionListTresholdRow';

export interface AuctionListRowUIType extends WithClassnameType {
Expand All @@ -13,53 +12,17 @@ export interface AuctionListRowUIType extends WithClassnameType {

export const AuctionListRow = ({
nodeData,
showTresholdRow,
expandRowDetails
showTresholdRow
}: AuctionListRowUIType) => {
const { sort, order } = useGetSort();
const isSortDesc = sort === 'auctionPosition' && order === SortOrderEnum.desc;

const hasExpand =
expandRowDetails?.qualifiedExpandPosition ||
expandRowDetails?.dangerZoneExpandPosition ||
expandRowDetails?.notQualifiedExpandPosition;

return (
<>
{isSortDesc && showTresholdRow && (
<AuctionListTresholdRow key={nodeData.bls} isSortDesc />
)}
{expandRowDetails?.qualifiedExpandPosition && (
<AuctionListExpandRow
nodeData={nodeData}
expandPosition={expandRowDetails.qualifiedExpandPosition}
closePosition={expandRowDetails.qualifiedExpandClosePosition}
remainingQualifiedValidators={
expandRowDetails?.remainingQualifiedValidators
}
/>
)}
{expandRowDetails?.dangerZoneExpandPosition && (
<AuctionListExpandRow
nodeData={nodeData}
expandPosition={expandRowDetails.dangerZoneExpandPosition}
closePosition={expandRowDetails.dangerZoneExpandClosePosition}
remainingDangerZoneValidators={
expandRowDetails?.remainingDangerZoneValidators
}
/>
)}
{expandRowDetails?.notQualifiedExpandPosition && (
<AuctionListExpandRow
nodeData={nodeData}
expandPosition={expandRowDetails.notQualifiedExpandPosition}
closePosition={expandRowDetails.notQualifiedExpandClosePosition}
remainingNotQualifiedValidators={
expandRowDetails?.remainingNotQualifiedValidators
}
/>
)}
{!hasExpand && <AuctionListBaseRow nodeData={nodeData} />}
<AuctionListBaseRow nodeData={nodeData} />
{!isSortDesc && showTresholdRow && (
<AuctionListTresholdRow key={nodeData.bls} />
)}
Expand Down

0 comments on commit 139567e

Please sign in to comment.