feat: boards with statuses fetch
This commit is contained in:
@ -20,10 +20,10 @@ const useGetNewRank = () => {
|
||||
: [overDealIndex, overDealIndex + 1];
|
||||
|
||||
const leftLexorank =
|
||||
leftIndex >= 0 ? LexoRank.parse(deals[leftIndex].rank) : null;
|
||||
leftIndex >= 0 ? LexoRank.parse(deals[leftIndex].lexorank) : null;
|
||||
const rightLexorank =
|
||||
rightIndex < deals.length
|
||||
? LexoRank.parse(deals[rightIndex].rank)
|
||||
? LexoRank.parse(deals[rightIndex].lexorank)
|
||||
: null;
|
||||
|
||||
return getNewLexorank(leftLexorank, rightLexorank).toString();
|
||||
@ -35,9 +35,11 @@ const useGetNewRank = () => {
|
||||
) => {
|
||||
const leftLexorank =
|
||||
overDealIndex > 0
|
||||
? LexoRank.parse(statusDeals[overDealIndex - 1].rank)
|
||||
? LexoRank.parse(statusDeals[overDealIndex - 1].lexorank)
|
||||
: null;
|
||||
const rightLexorank = LexoRank.parse(statusDeals[overDealIndex].rank);
|
||||
const rightLexorank = LexoRank.parse(
|
||||
statusDeals[overDealIndex].lexorank
|
||||
);
|
||||
|
||||
return getNewLexorank(leftLexorank, rightLexorank).toString();
|
||||
};
|
||||
@ -59,10 +61,12 @@ const useGetNewRank = () => {
|
||||
: [overIndex, overIndex + 1];
|
||||
|
||||
const leftLexorank =
|
||||
leftIndex >= 0 ? LexoRank.parse(statuses[leftIndex].rank) : null;
|
||||
leftIndex >= 0
|
||||
? LexoRank.parse(statuses[leftIndex].lexorank)
|
||||
: null;
|
||||
const rightLexorank =
|
||||
rightIndex < statuses.length
|
||||
? LexoRank.parse(statuses[rightIndex].rank)
|
||||
? LexoRank.parse(statuses[rightIndex].lexorank)
|
||||
: null;
|
||||
|
||||
return getNewLexorank(leftLexorank, rightLexorank).toString();
|
||||
|
||||
Reference in New Issue
Block a user