import React from 'react'; // material-ui import { useTheme } from '@mui/material/styles'; import { Box, Button, ButtonBase, Card, Grid, Menu, MenuItem, Stack, Typography } from '@mui/material'; // project imports import Avatar from 'ui-component/extended/Avatar'; import { CommentData, UserProfile } from '_mockApis/user-profile/types'; // assets import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord'; import MoreVertTwoToneIcon from '@mui/icons-material/MoreVertTwoTone'; import ThumbUpAltTwoToneIcon from '@mui/icons-material/ThumbUpAltTwoTone'; import ReplyTwoToneIcon from '@mui/icons-material/ReplyTwoTone'; const avatarImage = require.context('assets/images/profile', true); export interface ReplyProps { commentId: string; handleReplayLikes: (i: string, j: string, k: string) => void; onReply: () => void; postId: string; reply: { id: string; profile: UserProfile; data: CommentData }; } // ==============================|| POST & COMMENT - REPLAY ||============================== // const Reply = ({ commentId, handleReplayLikes, onReply, postId, reply }: ReplyProps) => { const theme = useTheme(); const { id } = reply; const [anchorEl, setAnchorEl] = React.useState Element) | null | undefined>(null); const handleClick = (event: React.MouseEvent | undefined) => { setAnchorEl(event?.currentTarget); }; const handleClose = () => { setAnchorEl(null); }; const replies = reply; return ( <> {Object.keys(replies).length > 0 && ( {replies.profile.name} {' '} {replies.profile.time} Edit Delete {replies.data.comment} )} ); }; export default Reply;