fix(lint): escape JSX entities and narrow useEffect dep
Escape French apostrophes/quotes in JSX text per react/no-unescaped-entities and replace the report?.observations.length dependency with a derived observationsCount value so react-hooks/exhaustive-deps is satisfied without re-firing on every report change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
3c32f66eb6
commit
a33693580f
6 files changed
+9
-8
No files matched your search
@@ -52,9 +52,10 @@ export default function EditorRoute() {
|
||||
species.pathologies().then((m) => setPathologies(m.default))
|
||||
}, [species])
|
||||
|
||||
const observationsCount = report?.observations.length ?? -1
|
||||
useEffect(() => {
|
||||
if (report && report.observations.length === 0) addObservation()
|
||||
}, [report?.observations.length, addObservation])
|
||||
if (observationsCount === 0) addObservation()
|
||||
}, [observationsCount, addObservation])
|
||||
|
||||
const activeObs = report?.observations[activeIndex]
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export default function HomeRoute() {
|
||||
<Card className="p-6 space-y-4">
|
||||
<h2 className="font-serif text-2xl">Nouveau bilan</h2>
|
||||
<p className="text-sm text-[var(--color-ink-muted)]">
|
||||
Démarrer un nouveau bilan d'ostéopathie sur un animal.
|
||||
Démarrer un nouveau bilan d'ostéopathie sur un animal.
|
||||
</p>
|
||||
<Button onClick={() => navigate('/new')} size="lg">Commencer</Button>
|
||||
</Card>
|
||||
|
||||
@@ -7,8 +7,8 @@ export default function NotFoundRoute() {
|
||||
<main className="min-h-screen grid place-items-center">
|
||||
<div className="text-center space-y-4">
|
||||
<h1 className="font-serif text-4xl">Page introuvable</h1>
|
||||
<p className="text-[var(--color-ink-muted)]">Le chemin demandé n'existe pas.</p>
|
||||
<Button onClick={() => navigate('/')}>Retour à l'accueil</Button>
|
||||
<p className="text-[var(--color-ink-muted)]">Le chemin demandé n'existe pas.</p>
|
||||
<Button onClick={() => navigate('/')}>Retour à l'accueil</Button>
|
||||
</div>
|
||||
</main>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user