Skip to content

Commit

Permalink
Merge branch 'main' into spalmurray/circleci-onbaording-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
spalmurray-codecov authored Apr 25, 2024
2 parents 2cbe2be + 577c127 commit 5e7c8fb
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import 'ui/Table/Table.css'
const columnHelper = createColumnHelper<Row>()

function getOrderingDirection(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 @@ -19,7 +19,7 @@ import 'ui/Table/Table.css'
const columnHelper = createColumnHelper<Row>()

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

if (state) {
const direction = state?.desc
Expand Down
2 changes: 1 addition & 1 deletion src/shared/ListRepo/ReposTable/ReposTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface ReposTableProps {
}

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

if (state) {
const direction = state?.desc
Expand Down
2 changes: 1 addition & 1 deletion src/shared/ListRepo/ReposTableTeam/ReposTableTeam.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import 'ui/Table/Table.css'
export function getSortingOption(
sorting: Array<{ id: string; desc: boolean }>
) {
const state = sorting.at(0)
const state = sorting[0]

if (state) {
const direction = state.desc
Expand Down

0 comments on commit 5e7c8fb

Please sign in to comment.