Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2139 Rev 2806
Línea 1... Línea 1...
1
import React, { useState, useLayoutEffect, useEffect } from 'react'
1
import React, { useState, useLayoutEffect, useEffect } from 'react'
2
import { useDispatch } from 'react-redux'
2
import { useDispatch } from 'react-redux'
3
import { Container, Grid } from '@mui/material'
3
import { Grid } from '@mui/material'
4
import styled from 'styled-components'
4
import styled from 'styled-components'
Línea 5... Línea 5...
5
 
5
 
6
import { axios } from '../../utils'
6
import { axios } from '../../utils'
7
import { getBackendVars } from '../../services/backendVars'
7
import { getBackendVars } from '../../services/backendVars'
Línea 130... Línea 130...
130
    readAllNotification()
130
    readAllNotification()
131
  }, [])
131
  }, [])
Línea 132... Línea 132...
132
 
132
 
133
  return (
133
  return (
134
    <>
-
 
135
      <Container>
134
    <>
136
        <Grid container spacing={2}>
135
      <Grid container spacing={2}>
137
          <Grid item xs={12} md={4}>
136
        <Grid item xs={12} md={4}>
138
            <ProfileInfo
137
          <ProfileInfo
139
              image={image}
138
            image={image}
140
              name={fullName}
139
            name={fullName}
141
              visits={visits}
140
            visits={visits}
142
              country={country}
141
            country={country}
143
              connections={connections}
142
            connections={connections}
144
            />
-
 
145
          </Grid>
-
 
146
          <Grid item xs={12} md={8}>
-
 
147
            <WidgetWrapper>
-
 
148
              <WidgetWrapper.Header title='Notificaciones'>
-
 
149
                <Options
-
 
150
                  options={[
-
 
151
                    {
-
 
152
                      label: 'Borrar notificaciones',
-
 
153
                      action: toggleConfirmModal
-
 
154
                    }
-
 
155
                  ]}
-
 
156
                />
-
 
157
              </WidgetWrapper.Header>
-
 
158
 
-
 
159
              <StyledNotificationList>
-
 
160
                {notifications.length ? (
-
 
161
                  [...notifications].reverse().map((notification, index) => (
-
 
162
                    <div key={index}>
-
 
163
                      <NotificationOption
-
 
164
                        {...notification}
-
 
165
                        onDelete={deleteNotification}
-
 
166
                      />
-
 
167
                    </div>
-
 
168
                  ))
-
 
169
                ) : (
-
 
170
                  <EmptySection
-
 
171
                    message='No hay notificaciones'
-
 
172
                    align='center'
-
 
173
                  />
-
 
174
                )}
-
 
175
              </StyledNotificationList>
-
 
176
            </WidgetWrapper>
-
 
177
          </Grid>
143
          />
-
 
144
        </Grid>
-
 
145
        <Grid item xs={12} md={8}>
-
 
146
          <WidgetWrapper>
-
 
147
            <WidgetWrapper.Header title='Notificaciones'>
-
 
148
              <Options
-
 
149
                options={[
-
 
150
                  {
-
 
151
                    label: 'Borrar notificaciones',
-
 
152
                    action: toggleConfirmModal
-
 
153
                  }
-
 
154
                ]}
-
 
155
              />
-
 
156
            </WidgetWrapper.Header>
-
 
157
 
-
 
158
            <StyledNotificationList>
-
 
159
              {notifications.length ? (
-
 
160
                [...notifications].reverse().map((notification, index) => (
-
 
161
                  <div key={index}>
-
 
162
                    <NotificationOption
-
 
163
                      {...notification}
-
 
164
                      onDelete={deleteNotification}
-
 
165
                    />
-
 
166
                  </div>
-
 
167
                ))
-
 
168
              ) : (
-
 
169
                <EmptySection message='No hay notificaciones' align='center' />
-
 
170
              )}
-
 
171
            </StyledNotificationList>
-
 
172
          </WidgetWrapper>
178
        </Grid>
173
        </Grid>
Línea 179... Línea 174...
179
      </Container>
174
      </Grid>
180
 
175
 
181
      <ConfirmModal
176
      <ConfirmModal
182
        show={confirmModalShow}
177
        show={confirmModalShow}