• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
You are now the owner of this repo.

EcrituresNumeriques / stylo / 18525052247

15 Oct 2025 09:57AM UTC coverage: 39.154% (-0.5%) from 39.607%
18525052247

push

github

web-flow
feat: mémorise le workspace sélectionné depuis le menu de navigation (#1666)

Co-authored-by: Thomas Parisot <thom4parisot@users.noreply.github.com>

602 of 851 branches covered (70.74%)

Branch coverage included in aggregate %.

34 of 47 new or added lines in 5 files covered. (72.34%)

88 existing lines in 5 files now uncovered.

5927 of 15824 relevant lines covered (37.46%)

2.55 hits per line

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

0.0
/front/src/components/workspace/WorkspacesMenu.jsx
1
import React from 'react'
×
2
import { NavLink } from 'react-router'
×
3

4
import { useWorkspaces } from '../../hooks/workspace.js'
×
5

6
import Alert from '../molecules/Alert.jsx'
×
7
import Loading from '../molecules/Loading.jsx'
×
8

9
import styles from '../header.module.scss'
×
NEW
10
import { usePreferenceItem } from '../../hooks/user.js'
×
11

12
export default function WorkspacesMenu({ activeTool }) {
×
13
  const { workspaces, error, isLoading } = useWorkspaces()
×
NEW
14
  const { setValue: setActiveWorkspaceId } = usePreferenceItem('workspaceId', 'user')
×
15

16
  if (isLoading) {
×
17
    return <Loading />
×
18
  }
×
19
  if (error) {
×
20
    return <Alert Alert={error.message} />
×
21
  }
×
22
  return (
×
23
    <>
×
24
      {workspaces.map((workspace) => (
×
25
        <li key={workspace._id}>
×
26
          <NavLink
×
27
            to={`/workspaces/${workspace._id}/${activeTool}`}
×
NEW
28
            onClick={() => setActiveWorkspaceId(workspace._id)}
×
UNCOV
29
            state={{ from: location.pathname }}
×
30
          >
31
            <span
×
32
              className={styles.chip}
×
33
              style={{ backgroundColor: workspace.color }}
×
34
            />
×
35

36
            {workspace.name}
×
37
          </NavLink>
×
38
        </li>
×
39
      ))}
×
40
    </>
×
41
  )
42
}
×
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