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

EcrituresNumeriques / stylo / 14090633575

26 Mar 2025 06:19PM UTC coverage: 31.811% (+0.01%) from 31.801%
14090633575

push

github

web-flow
chore: remplace feather par lucide (plus d'icĂ´nes) (#1374)

470 of 703 branches covered (66.86%)

Branch coverage included in aggregate %.

4 of 47 new or added lines in 46 files covered. (8.51%)

2 existing lines in 1 file now uncovered.

4483 of 14867 relevant lines covered (30.15%)

2.26 hits per line

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

0.0
/front/src/components/Write/Reference.jsx
1
import React, { memo, useCallback } from 'react'
×
2
import copy from 'copy-to-clipboard'
×
3
import { useTranslation } from 'react-i18next'
×
4
import { useToasts } from '@geist-ui/core'
×
5

NEW
6
import { Clipboard } from 'lucide-react'
×
7
import styles from './reference.module.scss'
×
8
import ReferenceTypeIcon from '../ReferenceTypeIcon'
×
9
import Button from '../Button'
×
10

11
const CopyButton = memo(function ReferenceCopyButton({ text }) {
×
12
  const { t } = useTranslation()
×
13
  const { setToast } = useToasts()
×
14

15
  const handleCopy = useCallback(() => {
×
16
    copy(text)
×
17
    setToast({
×
18
      type: 'default',
×
19
      text: t('write.copyReferenceToClipboard.successToast', { text }),
×
20
    })
×
21
  })
×
22

23
  return (
×
24
    <Button
×
25
      title={t('write.copyReferenceToClipboard.Button', { text })}
×
26
      className={styles.copyToClipboard}
×
27
      onClick={handleCopy}
×
28
      icon
×
29
    >
30
      <Clipboard />
×
31
    </Button>
×
32
  )
33
})
×
34

35
export default function BibliographyReference({ entry }) {
×
36
  const { key, title, type, date, authorName } = entry
×
37
  const text = `[@${key}]`
×
38

39
  return (
×
40
    <div className={styles.reference}>
×
41
      <ReferenceTypeIcon type={type} className={styles.referenceTypeIcon} />
×
42

43
      <div className={styles.referenceInfo}>
×
44
        <p
×
45
          className={styles.referencePrimaryInfo}
×
46
          title={authorName + ' | ' + title}
×
47
        >
48
          {authorName && (
×
49
            <span className={styles.referenceAuthor}>{authorName}</span>
×
50
          )}
51
          <span className={styles.referenceTitle} title={title}>
×
52
            {title}
×
53
          </span>
×
54
          <span className={styles.referenceDate}>{date}</span>
×
55
        </p>
×
56
        <p className={styles.referenceSecondaryInfo}>
×
57
          <span className={styles.referenceKey} title={'@' + key}>
×
58
            @{key}
×
59
          </span>
×
60
        </p>
×
61
      </div>
×
62

63
      <CopyButton text={text} />
×
64
    </div>
×
65
  )
66
}
×
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