Skip to content

Commit

Permalink
correc linter
Browse files Browse the repository at this point in the history
  • Loading branch information
aetchego committed Jan 14, 2025
1 parent 30a2916 commit 819249e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/components/Filters/CheckboxsFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const CheckboxsFilter = ({ name, value, label, options, disabled = false }: Chec
<>
{options.map((option) => (
<FormControlLabel
key={option.id}
disabled={disabled}
checked={isChecked(option.id, inputs)}
value={option.id}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Filters/RadioGroupFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import RadioGroup from 'components/ui/RadioGroup'
import React, { useContext, useEffect, useState } from 'react'
import { LabelObject } from 'types/searchCriterias'

type RadioGroupFilterProps<T> = {
type RadioGroupFilterProps = {
label?: string
value: string
name: string
options: LabelObject[]
disabled?: boolean
}

const RadioGroupFilter = <T,>({ name, value, label, options, disabled = false }: RadioGroupFilterProps<T>) => {
const RadioGroupFilter = ({ name, value, label, options, disabled = false }: RadioGroupFilterProps) => {
const context = useContext(FormContext)
const [input, setInput] = useState(value)

Expand Down
10 changes: 1 addition & 9 deletions src/components/Filters/SelectFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,7 @@ const SelectInput = <T,>({ value, name, options }: SelectInputProps<T>) => {
if (context?.updateFormData) context.updateFormData(name, inputs)
}, [inputs])

return (
<Select
value={inputs}
width={'200px'}
label="Trier par :"
items={options}
onchange={setInputs}
/>
)
return <Select value={inputs} width={'200px'} label="Trier par :" items={options} onchange={setInputs} />
}

export default SelectInput
5 changes: 4 additions & 1 deletion src/hooks/filters/useSavedFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ export const useSavedFilters = <T>(type: ResourceType) => {
setSavedFiltersErrors({ isError: false })
await getSavedFilters()
} catch {
setSavedFiltersErrors({ isError: true, errorMessage: "Il y a eu une erreur lors de l'enregistrement du filtre. Vérifiez que le nom n'existe pas déjà." })
setSavedFiltersErrors({
isError: true,
errorMessage: "Il y a eu une erreur lors de l'enregistrement du filtre. Vérifiez que le nom n'existe pas déjà."
})
throw 'Nom déjà existant'
}
}
Expand Down
1 change: 0 additions & 1 deletion src/services/aphp/callApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,6 @@ export const fetchAccessExpirations: (
return response
}


export const fetchPerimeterAccesses = async (perimeter: string): Promise<AxiosResponse<DataRights[]>> => {
const response = await apiBackend.get<DataRights[]>(`accesses/accesses/my-data-rights/?perimeters_ids=${perimeter}`)
return response
Expand Down

0 comments on commit 819249e

Please sign in to comment.