Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2185 Rev 2187
Línea 19... Línea 19...
19
import CommentForm from '@app/components/dashboard/linkedin/comments/comment-form'
19
import CommentForm from '@app/components/dashboard/linkedin/comments/comment-form'
20
import CommentsList from '@app/components/dashboard/linkedin/comments/comment-list'
20
import CommentsList from '@app/components/dashboard/linkedin/comments/comment-list'
21
import Button from '@app/components/UI/buttons/Buttons'
21
import Button from '@app/components/UI/buttons/Buttons'
22
import FeedReactions from '@app/components/dashboard/linkedin/feed/FeedReactions'
22
import FeedReactions from '@app/components/dashboard/linkedin/feed/FeedReactions'
23
import PostFile from '@app/components/post/PostFile'
23
import PostFile from '@app/components/post/PostFile'
-
 
24
import useMobile from '@app/hooks/useMobile'
Línea 24... Línea 25...
24
 
25
 
25
const PostViewPage = () => {
26
const PostViewPage = () => {
26
  const [post, setPost] = useState({})
27
  const [post, setPost] = useState({})
27
  const [totalSends, setTotalSends] = useState(0)
28
  const [totalSends, setTotalSends] = useState(0)
28
  const [reactions, setReactions] = useState([])
29
  const [reactions, setReactions] = useState([])
29
  const [myReaction, setMyReaction] = useState('')
-
 
30
  const [isMobile, setIsMobile] = useState(false)
30
  const [myReaction, setMyReaction] = useState('')
31
  const [comments, setComments] = useState([])
31
  const [comments, setComments] = useState([])
-
 
32
  const [showComments, setShowComments] = useState(false)
32
  const [showComments, setShowComments] = useState(false)
33
  const isMobile = useMobile()
33
  const { pathname } = useLocation()
34
  const { pathname } = useLocation()
34
  const labels = useSelector(({ intl }) => intl.labels)
35
  const labels = useSelector(({ intl }) => intl.labels)
Línea 35... Línea 36...
35
  const dispatch = useDispatch()
36
  const dispatch = useDispatch()
Línea 125... Línea 126...
125
        )
126
        )
126
      })
127
      })
127
  }, [pathname])
128
  }, [pathname])
Línea 128... Línea 129...
128
 
129
 
129
  useEffect(() => {
-
 
130
    if (showComments && !!comments.length) getComments()
-
 
131
  }, [showComments, comments])
-
 
132
 
-
 
133
  useEffect(() => {
-
 
134
    const ua = navigator.userAgent.toLowerCase()
-
 
135
    const isAndroid = ua.includes('android')
-
 
136
 
-
 
137
    if (isAndroid) {
130
  useEffect(() => {
138
      setIsMobile(true)
-
 
139
    }
131
    getComments()
Línea 140... Línea 132...
140
  }, [])
132
  }, [post])
141
 
133
 
142
  return (
134
  return (
143
    <Container as='main' className='px-0'>
135
    <Container as='main' className='px-0'>