Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3534 Rev 3535
Línea 1... Línea 1...
1
import React from 'react';
1
import React from 'react';
2
import { Typography } from '@mui/material';
2
import { Typography } from '@mui/material';
Línea -... Línea 3...
-
 
3
 
-
 
4
import { formatDate } from '@shared/utils';
-
 
5
import colors from '@styles/colors';
3
 
6
 
4
import { Card, CardContent, CardHeader } from '../card';
7
import { Card, CardContent, CardHeader } from '../card';
5
import { Menu } from '../menu';
-
 
Línea 6... Línea 8...
6
import colors from '@styles/colors';
8
import { Menu } from '../menu';
7
 
9
 
8
export function CommentItem({
10
export function CommentItem({
9
  comment: { image, fullname, date, comment: content },
11
  comment: { image, fullname, date = '2023-02-04T20:15:12', comment: content },
10
  onDelete,
12
  onDelete,
11
  onReport
13
  onReport
12
}) {
14
}) {
13
  return (
15
  return (
14
    <Card sx={{ backgroundColor: colors.dark }}>
16
    <Card sx={{ backgroundColor: colors.dark }}>
15
      <CardHeader
17
      <CardHeader
16
        avatar={image}
18
        avatar={image}
17
        title={fullname}
19
        title={fullname}
18
        subheader={date}
20
        subheader={formatDate(date)}
19
        renderAction={() => (
21
        renderAction={() => (
20
          <Menu>
22
          <Menu>
21
            {onDelete && <Menu.Item onClick={onDelete}>Eliminar</Menu.Item>}
23
            {onDelete && <Menu.Item onClick={onDelete}>Eliminar</Menu.Item>}