mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 08:13:49 +10:00
Merge branch 'main' into feat/separate-links
This commit is contained in:
@ -105,9 +105,9 @@ const Summary = () => {
|
||||
<h4 className="mb-2 border-b border-primary text-base font-bold">{section.name}</h4>
|
||||
|
||||
<div
|
||||
dangerouslySetInnerHTML={{ __html: section.content }}
|
||||
className="wysiwyg"
|
||||
style={{ columns: section.columns }}
|
||||
dangerouslySetInnerHTML={{ __html: section.content }}
|
||||
/>
|
||||
</section>
|
||||
);
|
||||
@ -154,7 +154,7 @@ const Link = ({ url, icon, iconOnRight, label, className }: LinkProps) => {
|
||||
rel="noreferrer noopener nofollow"
|
||||
className={cn("inline-block", className)}
|
||||
>
|
||||
{label || url.label || url.href}
|
||||
{label ?? (url.label || url.href)}
|
||||
</a>
|
||||
{iconOnRight && ( icon ?? <i className="ph ph-bold ph-link text-primary group-[.summary]:text-background" />)}
|
||||
</div>
|
||||
@ -209,7 +209,7 @@ const Section = <T,>({
|
||||
summaryKey,
|
||||
keywordsKey,
|
||||
}: SectionProps<T>) => {
|
||||
if (!section.visible || !section.items.length) return null;
|
||||
if (!section.visible || section.items.length === 0) return null;
|
||||
|
||||
return (
|
||||
<section id={section.id} className="grid">
|
||||
@ -235,7 +235,7 @@ const Section = <T,>({
|
||||
</div>
|
||||
|
||||
{summary !== undefined && !isEmptyString(summary) && (
|
||||
<div className="wysiwyg" dangerouslySetInnerHTML={{ __html: summary }} />
|
||||
<div dangerouslySetInnerHTML={{ __html: summary }} className="wysiwyg" />
|
||||
)}
|
||||
|
||||
{level !== undefined && level > 0 && <Rating level={level} />}
|
||||
@ -276,7 +276,7 @@ const Profiles = () => {
|
||||
) : (
|
||||
<p>{item.username}</p>
|
||||
)}
|
||||
<p className="text-sm">{item.network}</p>
|
||||
{!item.icon && <p className="text-sm">{item.network}</p>}
|
||||
</div>
|
||||
)}
|
||||
</Section>
|
||||
@ -518,36 +518,50 @@ const Custom = ({ id }: { id: string }) => {
|
||||
|
||||
const mapSectionToComponent = (section: SectionKey) => {
|
||||
switch (section) {
|
||||
case "profiles":
|
||||
case "profiles": {
|
||||
return <Profiles />;
|
||||
case "summary":
|
||||
}
|
||||
case "summary": {
|
||||
return <Summary />;
|
||||
case "experience":
|
||||
}
|
||||
case "experience": {
|
||||
return <Experience />;
|
||||
case "education":
|
||||
}
|
||||
case "education": {
|
||||
return <Education />;
|
||||
case "awards":
|
||||
}
|
||||
case "awards": {
|
||||
return <Awards />;
|
||||
case "certifications":
|
||||
}
|
||||
case "certifications": {
|
||||
return <Certifications />;
|
||||
case "skills":
|
||||
}
|
||||
case "skills": {
|
||||
return <Skills />;
|
||||
case "interests":
|
||||
}
|
||||
case "interests": {
|
||||
return <Interests />;
|
||||
case "publications":
|
||||
}
|
||||
case "publications": {
|
||||
return <Publications />;
|
||||
case "volunteer":
|
||||
}
|
||||
case "volunteer": {
|
||||
return <Volunteer />;
|
||||
case "languages":
|
||||
}
|
||||
case "languages": {
|
||||
return <Languages />;
|
||||
case "projects":
|
||||
}
|
||||
case "projects": {
|
||||
return <Projects />;
|
||||
case "references":
|
||||
}
|
||||
case "references": {
|
||||
return <References />;
|
||||
default:
|
||||
}
|
||||
default: {
|
||||
if (section.startsWith("custom.")) return <Custom id={section.split(".")[1]} />;
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user