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 { useUser } from "../hooks/useUser"; import { Candidate } from '../types/types'; import { CopyBubble } from "./CopyBubble"; interface CandidateInfoProps { candidate: Candidate; sx?: SxProps; action?: string; }; const CandidateInfo: React.FC = (props: CandidateInfoProps) => { const { candidate } = props; const { sx, action = '', } = 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 };