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

EcrituresNumeriques / stylo / 13987938500

21 Mar 2025 08:48AM UTC coverage: 31.659% (+0.6%) from 31.087%
13987938500

push

github

web-flow
chore: remplace les modales Geist (#1358)

Remplace aussi <Loading> par notre composant.

464 of 686 branches covered (67.64%)

Branch coverage included in aggregate %.

42 of 569 new or added lines in 36 files covered. (7.38%)

27 existing lines in 18 files now uncovered.

4396 of 14665 relevant lines covered (29.98%)

2.26 hits per line

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

0.0
/front/src/components/workspace/LeaveWorkspaceModal.jsx
1
import React, { useCallback } from 'react'
×
NEW
2
import { Note, Spacer, Text } from '@geist-ui/core'
×
NEW
3
import { Slash, Users } from 'react-feather'
×
4
import { Trans, useTranslation } from 'react-i18next'
×
5

6
import { useWorkspaceActions } from '../../hooks/workspace.js'
×
7

NEW
8
import Modal from '../Modal.jsx'
×
NEW
9
import FormActions from '../molecules/FormActions.jsx'
×
UNCOV
10
import WorkspaceLabel from './WorkspaceLabel.jsx'
×
11

NEW
12
import styles from './workspaceItem.module.scss'
×
13

NEW
14
export default function LeaveWorkspaceModal({ close, bindings, workspace }) {
×
15
  const { leaveWorkspace } = useWorkspaceActions()
×
16
  const handleLeavingWorkspace = useCallback(async () => {
×
17
    await leaveWorkspace(workspace._id)
×
NEW
18
    close()
×
19
  }, [workspace._id])
×
20

21
  const { t } = useTranslation()
×
22
  return (
×
NEW
23
    <Modal
×
NEW
24
      {...bindings}
×
NEW
25
      title={
×
NEW
26
        <>
×
NEW
27
          <Slash />
×
NEW
28
          {t('workspace.leaveModal.title')}
×
NEW
29
        </>
×
30
      }
31
    >
32
      <WorkspaceLabel
×
33
        className={styles.workspaceLabel}
×
34
        color={workspace.color}
×
35
        name={workspace.name}
×
36
      />
×
NEW
37
      {t('workspace.leaveModal.confirm')}
×
NEW
38
      {workspace.stats.membersCount === 1 && (
×
NEW
39
        <>
×
NEW
40
          <Spacer h={1} />
×
NEW
41
          <Note label="Important" type="error">
×
NEW
42
            <Trans i18nKey="workspace.leaveModal.confirmDeletion">
×
NEW
43
              Lʼespace de travail sera <Text i>supprimé</Text> car vous êtes la
×
44
              dernière personne appartenant à cet espace.
NEW
45
            </Trans>
×
NEW
46
          </Note>
×
NEW
47
        </>
×
48
      )}
NEW
49
      <FormActions onSubmit={handleLeavingWorkspace} onCancel={() => close()} />
×
NEW
50
    </Modal>
×
51
  )
52
}
×
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