Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 1437 | Rev 1567 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1437 Rev 1442
Línea 1... Línea 1...
1
import React, { useEffect, useState } from 'react'
1
import React, { useEffect, useState } from 'react'
2
import { axios } from '../../../../utils'
-
 
3
import { Modal } from 'react-bootstrap'
-
 
4
import { useDispatch } from 'react-redux'
2
import { useDispatch } from 'react-redux'
-
 
3
 
-
 
4
import { axios } from 'utils/index'
5
import { addNotification } from '../../../../redux/notification/notification.actions'
5
import { addNotification } from '../../../../redux/notification/notification.actions'
Línea -... Línea 6...
-
 
6
 
-
 
7
import Modal from 'components/UI/modal/Modal'
6
 
8
import TextInput from 'components/UI/inputs/TextInput'
-
 
9
import FormErrorFeedback from 'components/UI/form/FormErrorFeedback'
Línea 7... Línea 10...
7
import FormErrorFeedback from '../../../UI/form/FormErrorFeedback'
10
import { ButtonPrimary } from '@buttons'
8
 
11
 
9
const SharePopup = ({ shareData, onClose, onError, show }) => {
12
const SharePopup = ({ shareData, onClose, onError, show }) => {
10
  const [shareUrl, setShareUrl] = useState('')
13
  const [shareUrl, setShareUrl] = useState('')
Línea 53... Línea 56...
53
      getShareUrl(shareData?.url)
56
      getShareUrl(shareData?.url)
54
    }
57
    }
55
  }, [shareData, show])
58
  }, [shareData, show])
Línea 56... Línea 59...
56
 
59
 
57
  return (
60
  return (
58
    <Modal show={show} onHide={onClose} centered>
-
 
59
      <Modal.Header closeButton />
-
 
60
      <Modal.Body>
61
    <Modal show={show} onClose={onClose}>
61
        {state === 'error' ? (
62
      {state === 'error' ? (
62
          <FormErrorFeedback>
63
        <FormErrorFeedback>
63
            No se pudo copiar al portapapeles, por favor copia la url
64
          No se pudo copiar al portapapeles, por favor copia la url manualmente
64
            manualmente para compartir.
65
          para compartir.
65
          </FormErrorFeedback>
66
        </FormErrorFeedback>
-
 
67
      ) : null}
66
        ) : null}
68
 
-
 
69
      <TextInput type='text' value={shareUrl} readOnly />
67
        <input className='form-control' type='text' value={shareUrl} readOnly />
70
 
68
        <button className='btn btn-primary mt-3' onClick={copyClicked}>
-
 
69
          {getButtonText(state)}
-
 
70
        </button>
-
 
71
      </Modal.Body>
71
      <ButtonPrimary label={getButtonText(state)} onClick={copyClicked} />
72
    </Modal>
72
    </Modal>
73
  )
73
  )
Línea 74... Línea 74...
74
}
74
}