Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3472 Rev 3473
Línea 1... Línea 1...
1
import React, { useState } from 'react';
1
import React, { useState } from 'react';
2
import { useNavigate } from 'react-router-dom';
-
 
3
import { useSelector } from 'react-redux';
2
import { useSelector } from 'react-redux';
4
import { IconButton, Menu, MenuItem, styled, Typography } from '@mui/material';
3
import { IconButton, Menu, MenuItem, styled, Typography } from '@mui/material';
5
import { MoreVert } from '@mui/icons-material';
4
import { MoreVert } from '@mui/icons-material';
Línea 6... Línea 5...
6
 
5
 
Línea 14... Línea 13...
14
  right: theme.spacing(1),
13
  right: theme.spacing(1),
15
  zIndex: 1
14
  zIndex: 1
16
}));
15
}));
Línea 17... Línea 16...
17
 
16
 
18
export function KnowledgeCard({
17
export function KnowledgeCard({
19
  knowledge: { link_view, category, description, image, title },
18
  knowledge: { category, description, image, title },
20
  onEdit,
19
  onEdit,
21
  onDelete
20
  onDelete
22
}) {
21
}) {
23
  const labels = useSelector(({ intl }) => intl.labels);
22
  const labels = useSelector(({ intl }) => intl.labels);
24
  const [anchorEl, setAnchorEl] = useState();
-
 
25
  const navigate = useNavigate();
23
  const [anchorEl, setAnchorEl] = useState();
Línea 26... Línea 24...
26
  const open = Boolean(anchorEl);
24
  const open = Boolean(anchorEl);
27
 
25
 
28
  const handleClick = (event) => {
26
  const handleClick = (event) => {
Línea 40... Línea 38...
40
    handleClose();
38
    handleClose();
41
    onClick();
39
    onClick();
42
  };
40
  };
Línea 43... Línea 41...
43
 
41
 
44
  return (
42
  return (
45
    <Card onClick={() => navigate(link_view)}>
43
    <Card>
46
      <OptionsButton onClick={handleClick}>
44
      <OptionsButton onClick={handleClick}>
47
        <MoreVert />
45
        <MoreVert />
48
      </OptionsButton>
46
      </OptionsButton>
49
      <Menu
47
      <Menu