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

EcrituresNumeriques / stylo / 12925854411

23 Jan 2025 09:11AM UTC coverage: 25.831% (-4.7%) from 30.523%
12925854411

push

github

web-flow
Merge pull request #1192 from EcrituresNumeriques/feat/vite6

322 of 518 branches covered (62.16%)

Branch coverage included in aggregate %.

3448 of 14077 relevant lines covered (24.49%)

1.66 hits per line

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

0.0
/front/src/components/Write/ArticleEditorMenu.jsx
1
import React, { useCallback } from 'react'
×
2
import { useDispatch, useSelector } from 'react-redux'
×
3
import { useTranslation } from 'react-i18next'
×
4

5
import styles from './articleEditorMenu.module.scss'
×
6
import Biblio from './Biblio'
×
7
import Sommaire from './Sommaire'
×
8
import Versions from './Versions'
×
9
import { Sidebar } from 'react-feather'
×
10

11
export default function ArticleEditorMenu({
×
12
  articleInfos,
×
13
  readOnly,
×
14
  compareTo,
×
15
  selectedVersion,
×
16
}) {
×
17
  const expanded = useSelector(
×
18
    (state) => state.articlePreferences.expandSidebarLeft
×
19
  )
×
20
  const dispatch = useDispatch()
×
21
  const toggleExpand = useCallback(
×
22
    () =>
×
23
      dispatch({
×
24
        type: 'ARTICLE_PREFERENCES_TOGGLE',
×
25
        key: 'expandSidebarLeft',
×
26
      }),
×
27
    []
×
28
  )
×
29
  const { t } = useTranslation()
×
30

31
  return (
×
32
    <nav className={`${expanded ? styles.expandleft : styles.retractleft}`}>
×
33
      <button
×
34
        onClick={toggleExpand}
×
35
        className={expanded ? styles.close : styles.open}
×
36
      >
37
        <Sidebar />{' '}
×
38
        {expanded
×
39
          ? t('write.sidebar.closeButton')
×
40
          : t('write.sidebar.biblioAndCoButton')}
×
41
      </button>
×
42
      {expanded && (
×
43
        <div>
×
44
          <Versions
×
45
            article={articleInfos}
×
46
            selectedVersion={selectedVersion}
×
47
            compareTo={compareTo}
×
48
            readOnly={readOnly}
×
49
          />
×
50
          <Sommaire />
×
51
          <Biblio readOnly={readOnly} article={articleInfos} />
×
52
        </div>
×
53
      )}
54
    </nav>
×
55
  )
56
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc