Skip to content

Commit

Permalink
Merge branch 'main' into apr_24_cot_ui
Browse files Browse the repository at this point in the history
  • Loading branch information
JerrySentry authored Apr 25, 2024
2 parents f560608 + 577c127 commit 573680a
Show file tree
Hide file tree
Showing 19 changed files with 423 additions and 798 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const columns = [
]

function getOrderingDirection(sorting: Array<{ id: string; desc: boolean }>) {
const state = sorting.at(0)
const state = sorting[0]
return state ? (state.desc ? `-${state.id}` : state.id) : undefined
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const isNumericValue = (value: string) =>
value === 'patchPercentage' || value === 'head' || value === 'change'

function getFilter(sorting: Array<{ id: string; desc: boolean }>) {
const state = sorting.at(0)
const state = sorting[0]

if (state) {
const direction = state?.desc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const isNumericColumn = (cellId: string) =>
cellId === 'missedLines' || cellId === 'patchPercentage'

export function getFilter(sorting: Array<{ id: string; desc: boolean }>) {
const state = sorting.at(0)
const state = sorting[0]

if (state) {
const direction = state?.desc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function LoadMoreTrigger({
}

function getOrderingDirection(sorting: Array<{ id: string; desc: boolean }>) {
const state = sorting.at(0)
const state = sorting[0]
return state ? (state.desc ? `-${state.id}` : state.id) : undefined
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import isEmpty from 'lodash/isEmpty'
import isNumber from 'lodash/isNumber'
import qs from 'qs'
import { Fragment, lazy, Suspense, useEffect, useMemo, useState } from 'react'
import { useLocation , useParams } from 'react-router-dom'
import { useLocation, useParams } from 'react-router-dom'

import {
ImpactedFile,
Expand All @@ -40,7 +40,7 @@ const isNumericValue = (value: string) =>
value === 'change'

export function getFilter(sorting: Array<{ id: string; desc: boolean }>) {
const state = sorting.at(0)
const state = sorting[0]

if (state) {
const direction = state?.desc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import cs from 'classnames'
import isEmpty from 'lodash/isEmpty'
import qs from 'qs'
import { Fragment, lazy, Suspense, useEffect, useMemo, useState } from 'react'
import { useLocation , useParams } from 'react-router-dom'
import { useLocation, useParams } from 'react-router-dom'

import {
ImpactedFile,
Expand All @@ -35,7 +35,7 @@ const isNumericColumn = (cellId: string) =>
cellId === 'missedLines' || cellId === 'patchPercentage'

export function getFilter(sorting: Array<{ id: string; desc: boolean }>) {
const state = sorting.at(0)
const state = sorting[0]

if (state) {
const direction = state?.desc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function getFilters({
flags?: ParsedQs[] | string[]
components?: ParsedQs[] | string[]
}) {
const state = sorting.at(0)
const state = sorting[0]
const direction = state?.desc ? orderingDirection.desc : orderingDirection.asc

let parameter = undefined
Expand Down
Loading

0 comments on commit 573680a

Please sign in to comment.