Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 3203 Rev 3207
Línea -... Línea 1...
-
 
1
/* eslint-disable react/prop-types */
1
import React, { useEffect, useState } from "react";
2
import React, { useEffect, useState } from "react";
2
import { useDispatch } from "react-redux";
3
import { useDispatch } from "react-redux";
3
import { useForm } from "react-hook-form";
4
import { useForm } from "react-hook-form";
4
import FormErrorFeedback from "../../../shared/form-error-feedback/FormErrorFeedback";
5
import FormErrorFeedback from "../../../shared/form-error-feedback/FormErrorFeedback";
5
import FeedCommentTemplate from "./feed-comment/FeedCommentTemplate";
6
import FeedCommentTemplate from "./feed-comment/FeedCommentTemplate";
Línea 7... Línea 8...
7
import parse from "html-react-parser";
8
import parse from "html-react-parser";
8
import { axios } from "../../../utils";
9
import { axios } from "../../../utils";
9
import ConfirmModal from "../../../shared/confirm-modal/ConfirmModal";
10
import ConfirmModal from "../../../shared/confirm-modal/ConfirmModal";
10
import { Modal } from "react-bootstrap";
11
import { Modal } from "react-bootstrap";
11
import { feedTypes } from "../../../redux/feed/feed.types";
12
import { feedTypes } from "../../../redux/feed/feed.types";
12
import { BsFillTrashFill, BsHeart, BsHeartFill, BsTrash } from 'react-icons/bs'
13
import {  BsHeart, BsHeartFill, BsTrash } from 'react-icons/bs'
13
import { RiShareForwardLine } from 'react-icons/ri'
14
import { RiShareForwardLine } from 'react-icons/ri'
14
import { TbSend } from "react-icons/tb";
15
import { TbSend } from "react-icons/tb";
15
import { BiDotsVerticalRounded, BiMessage } from "react-icons/bi";
16
import { BiDotsVerticalRounded, BiMessage } from "react-icons/bi";
16
import styles from "./feedTemplate.module.scss";
17
import styles from "./feedTemplate.module.scss";
17
import styleFeed from "../share-feed/shareFeed.module.scss";
18
import styleFeed from "../share-feed/shareFeed.module.scss";
Línea 46... Línea 47...
46
    shared_file_document,
47
    shared_file_document,
47
    feed_likes,
48
    feed_likes,
48
    feed_like_url,
49
    feed_like_url,
49
    feed_unlike_url,
50
    feed_unlike_url,
50
    feed_is_liked,
51
    feed_is_liked,
-
 
52
    feed_highlighted,
51
    feed_share_url,
53
    feed_share_url,
52
    feed_delete_url,
54
    feed_delete_url,
53
    comments,
55
    comments,
54
    comment_add_url,
56
    comment_add_url,
55
  } = feed;
57
  } = feed;
Línea 77... Línea 79...
77
    setSharedState(owner_shared)
79
    setSharedState(owner_shared)
78
  }, [owner_shared]);
80
  }, [owner_shared]);
Línea 79... Línea 81...
79
 
81
 
80
  useEffect(() => {
82
  useEffect(() => {
81
    const handleClickOutside = (event) => {
83
    const handleClickOutside = (event) => {
82
        if (deleteButton.current && !deleteButton.current.contains(event.target)) {
84
      if (deleteButton.current && !deleteButton.current.contains(event.target)) {
83
            setDisplayOption(false)
85
        setDisplayOption(false)
84
        }
86
      }
85
    }
87
    }
Línea 86... Línea 88...
86
    document.addEventListener("mousedown", handleClickOutside);
88
    document.addEventListener("mousedown", handleClickOutside);
87
 
89
 
88
    return () => {
90
    return () => {
89
        document.removeEventListener("mousedown", handleClickOutside);
91
      document.removeEventListener("mousedown", handleClickOutside);
Línea 90... Línea 92...
90
    };
92
    };
91
}, [deleteButton]);
93
  }, [deleteButton]);
92
 
94
 
93
  const deleteFeedHandler = () => {
95
  const deleteFeedHandler = () => {
Línea 385... Línea 387...
385
            <OwnerDescription />
387
            <OwnerDescription />
386
          </div>
388
          </div>
387
        </div>
389
        </div>
388
      </Modal>
390
      </Modal>
Línea 389... Línea 391...
389
 
391
 
390
      <div className={styles.postContainer}>
392
      <div className={`${styles.postContainer} ${feed_highlighted ? 'highlighted' : ''}`}>
391
        <TopBar
393
        <TopBar
392
          showDescription
394
          showDescription
393
        />
395
        />
394
        <div
396
        <div