mirror of
https://github.com/JOYCEQL/magic-resume.git
synced 2026-07-03 14:07:11 +02:00
perf: simplify subtitle rendering logic and ensure date display consistency across sections
This commit is contained in:
@@ -67,17 +67,15 @@ const CustomSection = ({
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
{centerSubtitle && item.subtitle && (
|
||||
{centerSubtitle && (
|
||||
<motion.div layout="position" className="text-subtitleFont">
|
||||
{item.subtitle}
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{
|
||||
<span className="text-subtitleFont shrink-0">
|
||||
{item.dateRange}
|
||||
</span>
|
||||
}
|
||||
<span className="text-subtitleFont shrink-0">
|
||||
{item.dateRange}
|
||||
</span>
|
||||
</motion.div>
|
||||
|
||||
{!centerSubtitle && item.subtitle && (
|
||||
|
||||
@@ -37,14 +37,12 @@ const ExperienceItem = React.forwardRef<HTMLDivElement, ExperienceItemProps>(
|
||||
>
|
||||
{experience.company}
|
||||
</div>
|
||||
{experience.position && centerSubtitle && (
|
||||
{centerSubtitle && (
|
||||
<motion.div className="text-subtitleFont">
|
||||
{experience.position}
|
||||
</motion.div>
|
||||
)}
|
||||
{experience.date && (
|
||||
<div className="text-subtitleFont">{experience.date}</div>
|
||||
)}
|
||||
<div className="text-subtitleFont">{experience.date}</div>
|
||||
</motion.div>
|
||||
{experience.position && !centerSubtitle && (
|
||||
<motion.div className="text-subtitleFont">
|
||||
|
||||
@@ -51,14 +51,12 @@ const ProjectItem = React.forwardRef<HTMLDivElement, ProjectItemProps>(
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
{project.role && globalSettings?.centerSubtitle && (
|
||||
{globalSettings?.centerSubtitle && (
|
||||
<motion.div layout="position" className=" text-subtitleFont">
|
||||
{project.role}
|
||||
</motion.div>
|
||||
)}
|
||||
{project.date && (
|
||||
<div className="text-subtitleFont">{project.date}</div>
|
||||
)}
|
||||
<div className="text-subtitleFont">{project.date}</div>
|
||||
</motion.div>
|
||||
{project.role && !centerSubtitle && (
|
||||
<motion.div layout="position" className=" text-subtitleFont">
|
||||
|
||||
Reference in New Issue
Block a user