Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3694 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3694 Rev 3719
Línea 1... Línea 1...
1
import React, { useState } from 'react';
1
import React from 'react';
2
import { useSelector } from 'react-redux';
-
 
3
import DeleteOutline from '@mui/icons-material/DeleteOutline';
2
import DeleteOutline from '@mui/icons-material/DeleteOutline';
4
import { IconButton } from '@mui/material';
3
import { IconButton } from '@mui/material';
5
 
4
 
6
import { useGoTo } from '@hooks';
-
 
7
import { Link } from 'react-router-dom';
5
import { Link } from 'react-router-dom';
8
import { Box, Typography } from '@mui/material';
6
import { Box, Typography } from '@mui/material';
9
 
7
 
10
function NotificationOption({ link_delete, link, message, time_elapsed, onDelete }) {
8
function NotificationOption({ link_delete, link, message, time_elapsed, onDelete }) {
11
  return (
9
  return (
12
    <Box
10
    <Box
13
      sx={{
11
      sx={{
14
        display: 'flex',
12
        display: 'flex',
15
        alignItems: 'center',
13
        alignItems: 'center',
16
        justifyContent: 'space-between',
14
        justifyContent: 'space-between',
17
        gap: 2
15
        gap: 2
18
      }}
16
      }}
19
    >
17
    >
20
      <Box sx={{ display: 'inline-flex', flexDirection: 'column', mb: 1 }}>
18
      <Box sx={{ display: 'inline-flex', flexDirection: 'column', mb: 1 }}>
21
        <Link to={link}>
19
        <Link to={link}>
22
          <Typography variant='body1' sx={{ textDecoration: 'underline', mb: '0 !important' }}>
20
          <Typography variant='body1' sx={{ textDecoration: 'underline', mb: '0 !important' }}>
23
            {message}
21
            {message}
24
          </Typography>
22
          </Typography>
25
        </Link>
23
        </Link>
26
        <Typography variant='overline'>{time_elapsed}</Typography>
24
        <Typography variant='overline'>{time_elapsed}</Typography>
27
      </Box>
25
      </Box>
28
 
26
 
29
      <IconButton onClick={() => onDelete(link_delete)}>
27
      <IconButton onClick={() => onDelete(link_delete)}>
30
        <DeleteOutline />
28
        <DeleteOutline />
31
      </IconButton>
29
      </IconButton>
32
    </Box>
30
    </Box>
33
  );
31
  );
34
}
32
}
35
 
33
 
36
export default NotificationOption;
34
export default NotificationOption;