Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2190 Rev 2245
Línea 1... Línea 1...
1
import React, { useState } from 'react'
1
import React, { useState } from 'react'
2
import { useSelector } from 'react-redux'
2
import { useSelector } from 'react-redux'
3
import { SendOutlined, ChatOutlined } from '@mui/icons-material'
3
import { SendOutlined, ChatOutlined } from '@mui/icons-material'
4
import parse from 'html-react-parser'
-
 
Línea 5... Línea -...
5
 
-
 
6
import useMobile from '@app/hooks/useMobile'
4
 
7
import withExternalShare from '../dashboard/linkedin/withExternalShare'
5
import withExternalShare from '../dashboard/linkedin/withExternalShare'
Línea 8... Línea 6...
8
import withReactions from '@app/hocs/withReaction'
6
import withReactions from '@app/hocs/withReaction'
9
 
7
 
10
import Button from '../UI/buttons/Buttons'
8
import Button from '../UI/buttons/Buttons'
11
import WidgetWrapper from '../widgets/WidgetLayout'
9
import WidgetWrapper from '../widgets/WidgetLayout'
12
import Paraphrase from '../UI/Paraphrase'
10
import Paraphrase from '../UI/Paraphrase'
13
import PostFile from './PostFile'
-
 
-
 
11
import PostFile from './PostFile'
14
import FeedReactions from '../dashboard/linkedin/feed/FeedReactions'
12
import FeedReactions from '../dashboard/linkedin/feed/FeedReactions'
15
import MobileShare from '../dashboard/linkedin/mobile-share/MobileShare'
13
 
Línea 16... Línea 14...
16
import CommentForm from '../dashboard/linkedin/comments/comment-form'
14
import CommentForm from '../dashboard/linkedin/comments/comment-form'
17
import CommentsList from '../dashboard/linkedin/comments/comment-list'
15
import CommentsList from '../dashboard/linkedin/comments/comment-list'
Línea 40... Línea 38...
40
    share_increment_external_counter_url
38
    share_increment_external_counter_url
41
  } = post
39
  } = post
42
  const [showComments, setShowComments] = useState(false)
40
  const [showComments, setShowComments] = useState(false)
43
  const labels = useSelector(({ intl }) => intl.labels)
41
  const labels = useSelector(({ intl }) => intl.labels)
Línea 44... Línea -...
44
 
-
 
45
  const isMobile = useMobile()
-
 
46
 
42
 
47
  const displayCommentSection = () => {
43
  const displayCommentSection = () => {
48
    setShowComments(!showComments)
44
    setShowComments(!showComments)
Línea 49... Línea 45...
49
  }
45
  }
Línea 50... Línea 46...
50
 
46
 
Línea 51... Línea 47...
51
  const ExternalShareButton = withExternalShare(Button, post.share_external_url)
47
  const ExternalShareButton = withExternalShare(Button, share_external_url)
52
 
48
 
Línea 90... Línea 86...
90
        <Button onClick={displayCommentSection}>
86
        <Button onClick={displayCommentSection}>
91
          <ChatOutlined style={{ color: 'gray' }} />
87
          <ChatOutlined style={{ color: 'gray' }} />
92
          {labels.comment}
88
          {labels.comment}
93
        </Button>
89
        </Button>
Línea 94... Línea -...
94
 
-
 
95
        {!isMobile ? (
90
 
96
          <ExternalShareButton
91
        <ExternalShareButton
97
            shorterUrl={share_increment_external_counter_url}
92
          shorterUrl={share_increment_external_counter_url}
98
            setValue={updateTotalShare}
93
          setValue={updateTotalShare}
99
          >
94
        >
100
            <SendOutlined style={{ color: 'gray' }} />
95
          <SendOutlined style={{ color: 'gray' }} />
101
            {labels.send}
96
          {labels.send}
102
          </ExternalShareButton>
-
 
103
        ) : (
-
 
104
          <MobileShare
-
 
105
            shareData={{
-
 
106
              title: 'Leaders Linked',
-
 
107
              text: parse(description ?? ''),
-
 
108
              url: share_external_url
-
 
109
            }}
-
 
110
          >
-
 
111
            <SendOutlined />
-
 
112
            {labels.send}
-
 
113
          </MobileShare>
-
 
114
        )}
97
        </ExternalShareButton>
Línea 115... Línea 98...
115
      </WidgetWrapper.Actions>
98
      </WidgetWrapper.Actions>
116
 
99
 
117
      {showComments && (
100
      {showComments && (