Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 670 Rev 671
Línea 10... Línea 10...
10
 
10
 
11
import Options from '../../components/UI/Option'
11
import Options from '../../components/UI/Option'
12
import ConfirmModal from '../../components/modals/ConfirmModal'
12
import ConfirmModal from '../../components/modals/ConfirmModal'
13
import EmptySection from '../../components/UI/EmptySection'
13
import EmptySection from '../../components/UI/EmptySection'
-
 
14
import ProfileInfo from '../../components/widgets/default/ProfileWidget'
-
 
15
import styled from 'styled-components'
-
 
16
import StyledContainer from '../../components/widgets/WidgetLayout'
-
 
17
import Paraphrase from '../../components/UI/Paraphrase'
-
 
18
 
-
 
19
const StyledNotificationsContainer = styled(StyledContainer)`
-
 
20
  padding: 10px;
-
 
21
`
-
 
22
 
-
 
23
const StyledActionButton = styled(IconButton)`
-
 
24
  position: absolute;
-
 
25
  right: 0.5rem;
-
 
26
  top: 50%;
-
 
27
  transform: translateY(-50%);
Línea 14... Línea 28...
14
import ProfileInfo from '../../components/widgets/default/ProfileWidget'
28
`
15
 
29
 
16
const NotificationsPage = () => {
30
const NotificationsPage = () => {
17
  const [userInfo, setuserInfo] = useState({})
31
  const [userInfo, setuserInfo] = useState({})
Línea 138... Línea 152...
138
              visits={visits}
152
              visits={visits}
139
              country={country}
153
              country={country}
140
              connections={connections}
154
              connections={connections}
141
            />
155
            />
142
          </Col>
156
          </Col>
143
          <Col as='section' md='8' className='notification-list'>
157
          <Col as='section' md='8'>
144
            <div className='notification-header position-relative'>
158
            <StyledNotificationsContainer>
145
              <h2>Notificaciones</h2>
159
              <StyledNotificationsContainer.Header title='Notificaciones'>
146
              <Options
160
                <Options
147
                options={[
161
                  options={[
148
                  {
162
                    {
149
                    label: 'Borrar notificaciones',
163
                      label: 'Borrar notificaciones',
150
                    action: toggleConfirmModal
164
                      action: toggleConfirmModal
151
                  }
165
                    }
152
                ]}
166
                  ]}
153
              />
167
                />
154
            </div>
168
              </StyledNotificationsContainer.Header>
155
 
169
 
156
            {notifications.length ? (
170
              {notifications.length ? (
157
              [...notifications].reverse().map((notification, index) => (
171
                [...notifications].reverse().map((notification, index) => (
158
                <div key={index}>
172
                  <div key={index}>
159
                  <NotificationsPage.Item
173
                    <NotificationsPage.Item
160
                    onDelete={deleteNotification}
174
                      onDelete={deleteNotification}
161
                    {...notification}
175
                      {...notification}
162
                  />
176
                    />
163
                </div>
177
                  </div>
164
              ))
178
                ))
165
            ) : (
179
              ) : (
166
              <EmptySection message='No hay notificaciones' align='center' />
180
                <EmptySection message='No hay notificaciones' align='center' />
167
            )}
181
              )}
-
 
182
            </StyledNotificationsContainer>
168
          </Col>
183
          </Col>
169
        </Row>
184
        </Row>
170
      </Container>
185
      </Container>
171
      <ConfirmModal
186
      <ConfirmModal
172
        show={confirmModalShow}
187
        show={confirmModalShow}
Línea 181... Línea 196...
181
}
196
}
Línea 182... Línea 197...
182
 
197
 
183
const Item = ({ link_delete, link, message, time_elapsed, onDelete }) => {
198
const Item = ({ link_delete, link, message, time_elapsed, onDelete }) => {
184
  return (
199
  return (
185
    <div className='notification-item'>
-
 
186
      <div className='d-flex align-items-center justify-content-between m-0 p-0'>
200
    <div className='notification-item'>
187
        <Link to={link}>{message}</Link>
-
 
188
        <IconButton onClick={() => onDelete(link_delete)}>
201
      <Link to={link}>
189
          <DeleteOutline />
-
 
190
        </IconButton>
202
        <Paraphrase>{message}</Paraphrase>
191
      </div>
203
      </Link>
-
 
204
      <span>{time_elapsed}</span>
-
 
205
 
192
      <span>{time_elapsed}</span>
206
      <StyledActionButton onClick={() => onDelete(link_delete)}>
-
 
207
        <DeleteOutline />
193
      <hr />
208
      </StyledActionButton>
194
    </div>
209
    </div>
195
  )
210
  )
Línea 196... Línea 211...
196
}
211
}