• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

EcrituresNumeriques / stylo / 17938969292

23 Sep 2025 07:33AM UTC coverage: 39.628% (+0.2%) from 39.426%
17938969292

push

github

web-flow
feat: Remplace Geist toast par react-toastify (#1669)

589 of 829 branches covered (71.05%)

Branch coverage included in aggregate %.

18 of 152 new or added lines in 19 files covered. (11.84%)

101 existing lines in 16 files now uncovered.

5828 of 15364 relevant lines covered (37.93%)

2.62 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/front/src/components/collaborative/CollaborativeEditorArticleHeader.jsx
1
import React, { useEffect, useState } from 'react'
×
2
import { useTranslation } from 'react-i18next'
×
3
import { useSearchParams } from 'react-router'
×
4

5
import Toggle from '../molecules/Toggle.jsx'
×
UNCOV
6
import CollaborativeEditorActiveVersion from './CollaborativeEditorActiveVersion.jsx'
×
7
import CollaborativeEditorWriters from './CollaborativeEditorWriters.jsx'
×
8

9
import styles from './CollaborativeEditorArticleHeader.module.scss'
×
10

11
/**
12
 * @param props
13
 * @param {string} props.articleTitle
14
 * @param {string?} props.versionId
15
 * @returns {import('react').ReactElementElement}
16
 */
UNCOV
17
export default function CollaborativeEditorArticleHeader({
×
UNCOV
18
  articleTitle,
×
UNCOV
19
  versionId,
×
UNCOV
20
}) {
×
UNCOV
21
  const { t } = useTranslation()
×
22

23
  const [searchParams, setSearchParams] = useSearchParams()
×
24
  const [mode, setMode] = useState('edit')
×
25

26
  useEffect(() => {
×
UNCOV
27
    if (mode === 'preview' && searchParams.get('mode') !== 'preview') {
×
28
      setSearchParams({ mode: 'preview' })
×
29
    } else if (searchParams.get('mode') === 'preview') {
×
UNCOV
30
      setSearchParams({})
×
31
    }
×
32
  }, [mode])
×
33

34
  return (
×
35
    <header className={styles.header}>
×
36
      <h1 className={styles.title}>{articleTitle}</h1>
×
37

UNCOV
38
      <div className={styles.row}>
×
39
        <Toggle
×
40
          id="preview-mode"
×
41
          checked={mode === 'preview'}
×
UNCOV
42
          title={t('article.editor.preview')}
×
43
          onChange={(checked) => setMode(checked ? 'preview' : 'edit')}
×
44
        >
45
          {t('article.editor.preview')}
×
46
        </Toggle>
×
47

48
        <div className={styles.writers}>
×
UNCOV
49
          <CollaborativeEditorWriters />
×
50
        </div>
×
51
      </div>
×
UNCOV
52
      <CollaborativeEditorActiveVersion versionId={versionId} />
×
53
    </header>
×
54
  )
55
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc