Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 1331 Rev 1332
Línea 1... Línea 1...
1
import React, { useState } from "react";
1
import React, { useState } from "react";
2
import parse from "html-react-parser";
2
import parse from "html-react-parser";
3
import styled from "styled-components";
3
import styled from "styled-components";
4
import LikeButton from "../like-button/LikeButton";
4
import LikeButton from "../like-button/LikeButton";
-
 
5
import { addNotification } from "../../../../redux/notification/notification.actions";
-
 
6
import { useDispatch } from "react-redux";
Línea 5... Línea 7...
5
 
7
 
6
const StyledChatImgMessage = styled.div`
8
const StyledChatImgMessage = styled.div`
7
  display: flex;
9
  display: flex;
8
  justify-content: center;
10
  justify-content: center;
Línea 41... Línea 43...
41
 
43
 
Línea 42... Línea 44...
42
const MessageTemplate = ({ message, setResponseMessage, responseMessage }) => {
44
const MessageTemplate = ({ message, setResponseMessage, responseMessage }) => {
43
 
45
 
-
 
46
  const [isShow, setIsShow] = useState(false);
Línea 44... Línea 47...
44
  const [isShow, setIsShow] = useState(false);
47
  const [isLiked, setIsLiked] = useState(false);
45
  const [isLiked, setIsLiked] = useState(false);
48
  const dispatch = useDispatch()
46
 
49
 
47
  const senderName = (message) => {
50
  const senderName = (message) => {
Línea 55... Línea 58...
55
    setIsShow(!isShow)
58
    setIsShow(!isShow)
56
  }
59
  }
Línea 57... Línea 60...
57
 
60
 
58
  const handleCopy = () => {
61
  const handleCopy = () => {
-
 
62
    navigator.clipboard.writeText(`${message.m}`)
-
 
63
      .then(dispatch(addNotification({
-
 
64
        style: "success",
-
 
65
        msg: 'Mensaje copiado en el portapapeles',
59
    navigator.clipboard.writeText(`${message.m}`)
66
      })))
Línea 60... Línea 67...
60
  }
67
  }
61
 
68
 
62
  switch (message.mtype) {
69
  switch (message.mtype) {