Skip to content

Commit

Permalink
chore: Fix som lint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
JF-Cozy committed Sep 5, 2024
1 parent f066e00 commit 8884c83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions react/AppSections/generateI18nConfig.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const generateI18nConfig = (categories?: {
[key: string]: string
}): {
export const generateI18nConfig = (
categories?: Record<string, string>
): {
en: Record<string, string>
fr: Record<string, string>
} => {
Expand All @@ -11,7 +11,7 @@ export const generateI18nConfig = (categories?: {
for (const [key, value] of Object.entries(categories)) {
// Extract the final part of the path as the display name
const displayName =
value?.split('/').pop() ?? ''.replace(/([A-Z])/g, ' $1').trim()
value.split('/').pop() ?? ''.replace(/([A-Z])/g, ' $1').trim()

i18nConfig[`app_categories.${key}`] = displayName
}
Expand Down
4 changes: 2 additions & 2 deletions react/ContactsListModal/ContactsListModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ import {
import { DialogTitle, DialogContent } from '../Dialog'
import Icon from '../Icon'
import PlusIcon from '../Icons/Plus'
import TextField from '../TextField'
import useEventListener from '../hooks/useEventListener'
import useRealtime from '../hooks/useRealtime'
import CozyTheme from '../providers/CozyTheme'
import useBreakpoints from '../providers/Breakpoints'
import CozyTheme from '../providers/CozyTheme'
import { useI18n } from '../providers/I18n'
import TextField from '../TextField'

const ContactsListModal = ({
onItemClick,
Expand Down
2 changes: 1 addition & 1 deletion react/Dialog/DialogEffects.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '@testing-library/jest-dom'
import { Theme } from '@material-ui/core'
import '@testing-library/jest-dom'
import { render } from '@testing-library/react'
import React from 'react'

Expand Down

0 comments on commit 8884c83

Please sign in to comment.