import React from 'react'; import { Box, Link, Typography, Avatar, Grid, SxProps } from '@mui/material'; import { Card, CardContent, Divider, useTheme, } from '@mui/material'; import { useMediaQuery } from '@mui/material'; import { Candidate } from 'types/types'; import { CopyBubble } from "components/CopyBubble"; import { rest } from 'lodash'; interface CandidateInfoProps { candidate: Candidate; sx?: SxProps; action?: string; elevation?: number; }; const CandidateInfo: React.FC = (props: CandidateInfoProps) => { const { candidate } = props; const { sx, action = '', elevation = 1 } = props; const theme = useTheme(); const isMobile = useMediaQuery(theme.breakpoints.down('md')); if (!candidate) { return No user loaded.; } return ( .MuiTypography-root": { m: 0 } }}> { action !== '' && {action} } {candidate.fullName} {`/u/${candidate.username}`} { event.stopPropagation() }} tooltip="Copy link" content={`${window.location.origin}/u/{candidate.username}`} /> {candidate.description} {candidate.location && Location: {candidate.location.city}, {candidate.location.state || candidate.location.country} } {candidate.email && Email: {candidate.email} } { candidate.phone && Phone: {candidate.phone} } ); }; export { CandidateInfo };