Updated resume layout

This commit is contained in:
James Ketr 2025-07-15 10:44:53 -07:00
parent a0207f4d28
commit ddd024cc4a
3 changed files with 105 additions and 92 deletions

View File

@ -1,7 +1,6 @@
import React, { useEffect, useRef } from 'react'; import React, { useEffect, useRef } from 'react';
import { createPatch } from 'diff'; import { createPatch } from 'diff';
import { Box, SxProps } from '@mui/material'; import { Box, SxProps } from '@mui/material';
import * as Diff2Html from 'diff2html';
import { Diff2HtmlUI } from 'diff2html/lib/ui/js/diff2html-ui'; import { Diff2HtmlUI } from 'diff2html/lib/ui/js/diff2html-ui';
import 'diff2html/bundles/css/diff2html.min.css'; import 'diff2html/bundles/css/diff2html.min.css';
import './DiffViewer.css'; import './DiffViewer.css';

View File

@ -141,7 +141,7 @@
.BackstoryResumeHeader { .BackstoryResumeHeader {
gap: 1rem; gap: 1rem;
display: flex; display: flex;
flex-direction: column; /* flex-direction: column; */
/* border: 3px solid orange; */ /* border: 3px solid orange; */
} }

View File

@ -1,4 +1,4 @@
import React, { useEffect, useRef, useState } from 'react'; import React, { useEffect, useMemo, useRef, useState } from 'react';
import { import {
Box, Box,
Typography, Typography,
@ -410,6 +410,7 @@ const StyledHeader: React.FC<BackstoryStyledResumeProps> = ({ candidate, style }
return ( return (
<Box className="BackstoryResumeHeader" sx={style.headerStyle}> <Box className="BackstoryResumeHeader" sx={style.headerStyle}>
<Box sx={{ display: 'flex', flexDirection: 'column', flexGrow: 1 }}> <Box sx={{ display: 'flex', flexDirection: 'column', flexGrow: 1 }}>
<Box sx={{ display: 'flex' }}>
<Typography <Typography
variant="h4" variant="h4"
sx={{ sx={{
@ -421,8 +422,17 @@ const StyledHeader: React.FC<BackstoryStyledResumeProps> = ({ candidate, style }
> >
{candidate.fullName} {candidate.fullName}
</Typography> </Typography>
</Box>
<Box
sx={{
display: 'flex',
flexDirection: 'row',
alignItems: 'flex-start',
gap: 1,
}}
>
{candidate.description && ( {candidate.description && (
<Box sx={{ display: 'flex' }}>
<Typography <Typography
variant="h6" variant="h6"
sx={{ sx={{
@ -435,8 +445,8 @@ const StyledHeader: React.FC<BackstoryStyledResumeProps> = ({ candidate, style }
> >
{candidate.description} {candidate.description}
</Typography> </Typography>
)}
</Box> </Box>
)}
<Box <Box
sx={{ sx={{
@ -526,6 +536,8 @@ const StyledHeader: React.FC<BackstoryStyledResumeProps> = ({ candidate, style }
</Grid> </Grid>
)} */} )} */}
</Box> </Box>
</Box>
</Box>
); );
}; };
@ -563,7 +575,9 @@ const ResumeInfo: React.FC<ResumeInfoProps> = (props: ResumeInfoProps) => {
} }
}, [resume, activeResume]); }, [resume, activeResume]);
const currentStyle = resumeStyles[selectedStyle]; const currentStyle = useMemo(() => {
return resumeStyles[selectedStyle];
}, [selectedStyle]);
// Rest of the component remains the same... // Rest of the component remains the same...
const deleteResume = async (id: string | undefined): Promise<void> => { const deleteResume = async (id: string | undefined): Promise<void> => {