• 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/workspace/WorkspaceManageMembers.jsx
1
import React, { useCallback } from 'react'
×
NEW
2
import { toast } from 'react-toastify'
×
3

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

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

9
export default function WorkspaceManageMembers({ workspace }) {
×
10
  const workspaceId = workspace._id
×
11
  const { members, error, isLoading, inviteMember, removeMember } =
×
12
    useWorkspaceMembersActions(workspaceId)
×
13

14
  const handleUserUpdated = useCallback(
×
15
    async ({ user, action }) => {
×
16
      if (action === 'select') {
×
17
        try {
×
18
          await inviteMember(user)
×
NEW
19
          toast(
×
NEW
20
            `Utilisateur ${
×
21
              user.displayName || user.username
×
22
            } invité en tant que membre.`,
×
NEW
23
            {
×
NEW
24
              type: 'info',
×
NEW
25
            }
×
NEW
26
          )
×
27
        } catch (err) {
×
NEW
28
          toast(String(err), {
×
29
            type: 'error',
×
30
          })
×
31
        }
×
32
      } else if (action === 'unselect') {
×
33
        try {
×
34
          await removeMember(user)
×
NEW
35
          toast(
×
NEW
36
            `Utilisateur ${
×
37
              user.displayName || user.username
×
38
            } supprimé des membres.`,
×
NEW
39
            {
×
NEW
40
              type: 'warning',
×
NEW
41
            }
×
NEW
42
          )
×
43
        } catch (err) {
×
NEW
44
          toast(String(err), {
×
45
            type: 'error',
×
46
          })
×
47
        }
×
48
      }
×
49
    },
×
50
    [workspaceId]
×
51
  )
×
52

53
  if (error) {
×
54
    return <div>Unable to load workspace members</div>
×
55
  }
×
56

57
  if (isLoading) {
×
58
    return <Loading />
×
59
  }
×
60

61
  return (
×
62
    <section>
×
63
      <ContactSearch
×
64
        onUserUpdated={handleUserUpdated}
×
65
        members={members}
×
66
        showActiveUser
×
67
      />
×
68
    </section>
×
69
  )
70
}
×
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