Image profile update works

This commit is contained in:
James Ketr 2025-06-02 17:36:47 -07:00
parent 699acf9313
commit f286868cbe
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ const CandidateListingPage = (props: BackstoryPageProps) => {
onClick={() => { setSelectedCandidate(u); navigate("/chat"); }} onClick={() => { setSelectedCandidate(u); navigate("/chat"); }}
sx={{ cursor: "pointer" }}> sx={{ cursor: "pointer" }}>
{selectedCandidate?.id === u.id && {selectedCandidate?.id === u.id &&
<CandidateInfo sx={{ maxWidth: "320px", "cursor": "pointer", border: "2px solid yellow", "&:hover": { border: "2px solid orange" } }} candidate={u} /> <CandidateInfo sx={{ maxWidth: "320px", "cursor": "pointer", backgroundColor: "#f0f0f0", "&:hover": { border: "2px solid orange" } }} candidate={u} />
} }
{selectedCandidate?.id !== u.id && {selectedCandidate?.id !== u.id &&
<CandidateInfo sx={{ maxWidth: "320px", "cursor": "pointer", border: "2px solid transparent", "&:hover": { border: "2px solid orange" } }} candidate={u} /> <CandidateInfo sx={{ maxWidth: "320px", "cursor": "pointer", border: "2px solid transparent", "&:hover": { border: "2px solid orange" } }} candidate={u} />

View File

@ -207,7 +207,7 @@ const CandidateProfilePage: React.FC<BackstoryPageProps> = (props: BackstoryPage
const handleImageUpload = async (e: React.ChangeEvent<HTMLInputElement>) => { const handleImageUpload = async (e: React.ChangeEvent<HTMLInputElement>) => {
if (e.target.files && e.target.files[0]) { if (e.target.files && e.target.files[0]) {
if (await apiClient.uploadCandidateProfile(e.target.files[0])) { if (await apiClient.uploadCandidateProfile(e.target.files[0])) {
candidate.profileImage = e.target.files[0].name; candidate.profileImage = 'profile.' + e.target.files[0].name.replace(/^.*\./, '');
updateUserData(candidate); updateUserData(candidate);
} }
} }