Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3017 Rev 3099
Línea 1... Línea 1...
1
import React, { useMemo, useState } from 'react'
1
import React, { useMemo, useState } from 'react'
2
import { useSelector } from 'react-redux'
2
import { useSelector } from 'react-redux'
-
 
3
import { styled } from '@mui/material'
Línea 3... Línea 4...
3
 
4
 
4
import Widget from '@components/UI/Widget'
5
import Widget from '@components/UI/Widget'
5
import SurveyForm from '@components/survey-form/SurveyForm'
6
import SurveyForm from '@components/survey-form/SurveyForm'
Línea -... Línea 7...
-
 
7
import FeedDescription from './feed-description'
-
 
8
 
-
 
9
const FeedContainer = styled(Widget)(({ theme }) => ({
-
 
10
  padding: 0,
-
 
11
  '& > *:not(img, video, .MuiCard-root)': {
-
 
12
    padding: theme.spacing(0, 1)
-
 
13
  },
-
 
14
  '.MuiCard-root': {
-
 
15
    margin: theme.spacing(0, 1)
-
 
16
  },
-
 
17
  '& > p, & > span': {
-
 
18
    fontSize: '1rem',
-
 
19
    wordWrap: 'break-word',
-
 
20
    fontWeight: 'normal'
-
 
21
  },
-
 
22
  '& > img, & > video ': {
-
 
23
    width: '100%',
-
 
24
    maxHeight: '600px',
-
 
25
    objectFit: 'contain',
-
 
26
    position: 'relative',
-
 
27
    backgroundColor: '#000e'
-
 
28
  }
6
import FeedDescription from './feed-description'
29
}))
7
 
30
 
Línea 8... Línea 31...
8
export default function FeedContent({ id }) {
31
export default function FeedContent({ id }) {
9
  const [showModal, setShowModal] = useState(false)
32
  const [showModal, setShowModal] = useState(false)
Línea 111... Línea 134...
111
              <Widget.Header
134
              <Widget.Header
112
                avatar={sharedImage}
135
                avatar={sharedImage}
113
                title={sharedName}
136
                title={sharedName}
114
                subheader={sharedTimeElapse}
137
                subheader={sharedTimeElapse}
115
              />
138
              />
116
              <Widget.Body>
139
              <FeedContainer>
117
                {renderContent({
140
                {renderContent({
118
                  type: sharedContentType,
141
                  type: sharedContentType,
119
                  description: sharedFeedDescription,
142
                  description: sharedFeedDescription,
120
                  document: sharedFileDocument,
143
                  document: sharedFileDocument,
121
                  image: sharedFileImage,
144
                  image: sharedFileImage,
122
                  video: sharedFileVideo,
145
                  video: sharedFileVideo,
123
                  imagePreview: sharedFileImagePreview
146
                  imagePreview: sharedFileImagePreview
124
                })}
147
                })}
125
              </Widget.Body>
148
              </FeedContainer>
126
            </Widget>
149
            </Widget>
127
          </>
150
          </>
128
        )
151
        )
129
      }
152
      }
130
      default:
153
      default:
131
        return <FeedDescription description={description} />
154
        return <FeedDescription description={description} />
132
    }
155
    }
133
  }
156
  }
Línea 134... Línea 157...
134
 
157
 
135
  return (
158
  return (
136
    <Widget.Body
-
 
137
      styles={{
-
 
138
        padding: 0,
-
 
139
        '& > *:not(img, video, .MuiCard-root)': {
-
 
140
          padding: '0 1rem'
-
 
141
        },
-
 
142
        '.MuiCard-root': {
-
 
143
          margin: '0 1rem'
-
 
144
        },
-
 
145
        '& > p, & > span': {
-
 
146
          fontSize: '1rem',
-
 
147
          wordWrap: 'break-word',
-
 
148
          fontWeight: 'normal'
-
 
149
        },
-
 
150
        '& > img, & > video ': {
-
 
151
          width: '100%',
-
 
152
          maxHeight: '600px',
-
 
153
          objectFit: 'contain',
-
 
154
          position: 'relative',
-
 
155
          backgroundColor: '#000e'
-
 
156
        }
-
 
157
      }}
-
 
158
    >
159
    <FeedContainer>
159
      {renderContent({
160
      {renderContent({
160
        description,
161
        description,
161
        image,
162
        image,
162
        document,
163
        document,
Línea 166... Línea 167...
166
        type: sharedName ? 'shared' : contentType,
167
        type: sharedName ? 'shared' : contentType,
167
        sharedName,
168
        sharedName,
168
        sharedImage,
169
        sharedImage,
169
        sharedTimeElapse
170
        sharedTimeElapse
170
      })}
171
      })}
171
    </Widget.Body>
172
    </FeedContainer>
172
  )
173
  )
173
}
174
}