mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 08:13:49 +10:00
check if property exists in data object
This commit is contained in:
@ -70,6 +70,7 @@ const Castform = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Skills = () =>
|
const Skills = () =>
|
||||||
|
data.skills &&
|
||||||
data.skills.enable && (
|
data.skills.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title="Skills" />
|
<Heading title="Skills" />
|
||||||
@ -78,7 +79,7 @@ const Castform = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Objective = () =>
|
const Objective = () =>
|
||||||
data.objective.enable && <p className="m-5 text-sm">{data.objective.body}</p>;
|
data.objective && data.objective.enable && <p className="m-5 text-sm">{data.objective.body}</p>;
|
||||||
|
|
||||||
const WorkItem = x => (
|
const WorkItem = x => (
|
||||||
<div key={x.title} className="my-3 px-5">
|
<div key={x.title} className="my-3 px-5">
|
||||||
@ -96,6 +97,7 @@ const Castform = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Work = () =>
|
const Work = () =>
|
||||||
|
data.work &&
|
||||||
data.work.enable && (
|
data.work.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading light title={data.work.heading} />
|
<Heading light title={data.work.heading} />
|
||||||
@ -114,6 +116,7 @@ const Castform = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const References = () =>
|
const References = () =>
|
||||||
|
data.references &&
|
||||||
data.references.enable && (
|
data.references.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading light title={data.references.heading} />
|
<Heading light title={data.references.heading} />
|
||||||
@ -145,6 +148,7 @@ const Castform = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Languages = () =>
|
const Languages = () =>
|
||||||
|
data.languages &&
|
||||||
data.languages.enable && (
|
data.languages.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.languages.heading} />
|
<Heading title={data.languages.heading} />
|
||||||
@ -171,6 +175,7 @@ const Castform = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Education = () =>
|
const Education = () =>
|
||||||
|
data.education &&
|
||||||
data.education.enable && (
|
data.education.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading light title={data.education.heading} />
|
<Heading light title={data.education.heading} />
|
||||||
@ -187,6 +192,7 @@ const Castform = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Awards = () =>
|
const Awards = () =>
|
||||||
|
data.awards &&
|
||||||
data.awards.enable && (
|
data.awards.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading light title={data.awards.heading} />
|
<Heading light title={data.awards.heading} />
|
||||||
@ -203,6 +209,7 @@ const Castform = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Certifications = () =>
|
const Certifications = () =>
|
||||||
|
data.certifications &&
|
||||||
data.certifications.enable && (
|
data.certifications.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.certifications.heading} />
|
<Heading title={data.certifications.heading} />
|
||||||
@ -218,6 +225,7 @@ const Castform = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Extras = () =>
|
const Extras = () =>
|
||||||
|
data.extras &&
|
||||||
data.extras.enable && (
|
data.extras.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.extras.heading} />
|
<Heading title={data.extras.heading} />
|
||||||
|
|||||||
@ -55,6 +55,7 @@ const Gengar = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Objective = () =>
|
const Objective = () =>
|
||||||
|
data.objective &&
|
||||||
data.objective.enable && (
|
data.objective.enable && (
|
||||||
<div className="flex flex-col justify-center items-start mb-6">
|
<div className="flex flex-col justify-center items-start mb-6">
|
||||||
<Heading title={data.objective.heading} />
|
<Heading title={data.objective.heading} />
|
||||||
@ -69,6 +70,7 @@ const Gengar = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Skills = () =>
|
const Skills = () =>
|
||||||
|
data.skills &&
|
||||||
data.skills.enable && (
|
data.skills.enable && (
|
||||||
<div className="mb-6">
|
<div className="mb-6">
|
||||||
<Heading title={data.skills.heading} />
|
<Heading title={data.skills.heading} />
|
||||||
@ -103,6 +105,7 @@ const Gengar = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Education = () =>
|
const Education = () =>
|
||||||
|
data.education &&
|
||||||
data.education.enable && (
|
data.education.enable && (
|
||||||
<div className="mb-6">
|
<div className="mb-6">
|
||||||
<Heading title={data.education.heading} />
|
<Heading title={data.education.heading} />
|
||||||
@ -119,6 +122,7 @@ const Gengar = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Certifications = () =>
|
const Certifications = () =>
|
||||||
|
data.certifications &&
|
||||||
data.certifications.enable && (
|
data.certifications.enable && (
|
||||||
<div className="mb-6">
|
<div className="mb-6">
|
||||||
<Heading title={data.certifications.heading} />
|
<Heading title={data.certifications.heading} />
|
||||||
@ -135,6 +139,7 @@ const Gengar = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Awards = () =>
|
const Awards = () =>
|
||||||
|
data.awards &&
|
||||||
data.awards.enable && (
|
data.awards.enable && (
|
||||||
<div className="mb-6">
|
<div className="mb-6">
|
||||||
<Heading title={data.awards.heading} />
|
<Heading title={data.awards.heading} />
|
||||||
@ -153,6 +158,7 @@ const Gengar = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const References = () =>
|
const References = () =>
|
||||||
|
data.references &&
|
||||||
data.references.enable && (
|
data.references.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.references.heading} />
|
<Heading title={data.references.heading} />
|
||||||
@ -176,6 +182,7 @@ const Gengar = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Work = () =>
|
const Work = () =>
|
||||||
|
data.work &&
|
||||||
data.work.enable && (
|
data.work.enable && (
|
||||||
<div className="mb-6">
|
<div className="mb-6">
|
||||||
<Heading title={data.work.heading} />
|
<Heading title={data.work.heading} />
|
||||||
@ -197,6 +204,7 @@ const Gengar = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Languages = () =>
|
const Languages = () =>
|
||||||
|
data.languages &&
|
||||||
data.languages.enable && (
|
data.languages.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.languages.heading} />
|
<Heading title={data.languages.heading} />
|
||||||
@ -212,6 +220,7 @@ const Gengar = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Extras = () =>
|
const Extras = () =>
|
||||||
|
data.extras &&
|
||||||
data.extras.enable && (
|
data.extras.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.extras.heading} />
|
<Heading title={data.extras.heading} />
|
||||||
|
|||||||
@ -52,6 +52,7 @@ const Onyx = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Objective = () =>
|
const Objective = () =>
|
||||||
|
data.objective &&
|
||||||
data.objective.enable && (
|
data.objective.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.objective.heading} />
|
<Heading title={data.objective.heading} />
|
||||||
@ -75,6 +76,7 @@ const Onyx = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Work = () =>
|
const Work = () =>
|
||||||
|
data.work &&
|
||||||
data.work.enable && (
|
data.work.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.work.heading} />
|
<Heading title={data.work.heading} />
|
||||||
@ -101,6 +103,7 @@ const Onyx = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Education = () =>
|
const Education = () =>
|
||||||
|
data.education &&
|
||||||
data.education.enable && (
|
data.education.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.education.heading} />
|
<Heading title={data.education.heading} />
|
||||||
@ -117,6 +120,7 @@ const Onyx = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Awards = () =>
|
const Awards = () =>
|
||||||
|
data.awards &&
|
||||||
data.awards.enable && (
|
data.awards.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.awards.heading} />
|
<Heading title={data.awards.heading} />
|
||||||
@ -133,6 +137,7 @@ const Onyx = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Certifications = () =>
|
const Certifications = () =>
|
||||||
|
data.certifications &&
|
||||||
data.certifications.enable && (
|
data.certifications.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.certifications.heading} />
|
<Heading title={data.certifications.heading} />
|
||||||
@ -154,6 +159,7 @@ const Onyx = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Skills = () =>
|
const Skills = () =>
|
||||||
|
data.skills &&
|
||||||
data.skills.enable && (
|
data.skills.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.skills.heading} />
|
<Heading title={data.skills.heading} />
|
||||||
@ -175,6 +181,7 @@ const Onyx = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Languages = () =>
|
const Languages = () =>
|
||||||
|
data.languages &&
|
||||||
data.languages.enable && (
|
data.languages.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.languages.heading} />
|
<Heading title={data.languages.heading} />
|
||||||
@ -193,6 +200,7 @@ const Onyx = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const References = () =>
|
const References = () =>
|
||||||
|
data.references &&
|
||||||
data.references.enable && (
|
data.references.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.references.heading} />
|
<Heading title={data.references.heading} />
|
||||||
@ -208,6 +216,7 @@ const Onyx = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Extras = () =>
|
const Extras = () =>
|
||||||
|
data.extras &&
|
||||||
data.extras.enable && (
|
data.extras.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.extras.heading} />
|
<Heading title={data.extras.heading} />
|
||||||
|
|||||||
@ -68,6 +68,7 @@ const Pikachu = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Skills = () =>
|
const Skills = () =>
|
||||||
|
data.skills &&
|
||||||
data.skills.enable && (
|
data.skills.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.skills.heading} />
|
<Heading title={data.skills.heading} />
|
||||||
@ -86,6 +87,7 @@ const Pikachu = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const References = () =>
|
const References = () =>
|
||||||
|
data.references &&
|
||||||
data.references.enable && (
|
data.references.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.references.heading} />
|
<Heading title={data.references.heading} />
|
||||||
@ -107,6 +109,7 @@ const Pikachu = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Languages = () =>
|
const Languages = () =>
|
||||||
|
data.languages &&
|
||||||
data.languages.enable && (
|
data.languages.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.languages.heading} />
|
<Heading title={data.languages.heading} />
|
||||||
@ -122,6 +125,7 @@ const Pikachu = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Extras = () =>
|
const Extras = () =>
|
||||||
|
data.extras &&
|
||||||
data.extras.enable && (
|
data.extras.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.extras.heading} />
|
<Heading title={data.extras.heading} />
|
||||||
@ -145,6 +149,7 @@ const Pikachu = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Work = () =>
|
const Work = () =>
|
||||||
|
data.work &&
|
||||||
data.work.enable && (
|
data.work.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.work.heading} />
|
<Heading title={data.work.heading} />
|
||||||
@ -173,6 +178,7 @@ const Pikachu = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Education = () =>
|
const Education = () =>
|
||||||
|
data.education &&
|
||||||
data.education.enable && (
|
data.education.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.education.heading} />
|
<Heading title={data.education.heading} />
|
||||||
@ -189,6 +195,7 @@ const Pikachu = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Awards = () =>
|
const Awards = () =>
|
||||||
|
data.awards &&
|
||||||
data.awards.enable && (
|
data.awards.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.awards.heading} />
|
<Heading title={data.awards.heading} />
|
||||||
@ -205,6 +212,7 @@ const Pikachu = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const Certifications = () =>
|
const Certifications = () =>
|
||||||
|
data.certifications &&
|
||||||
data.certifications.enable && (
|
data.certifications.enable && (
|
||||||
<div>
|
<div>
|
||||||
<Heading title={data.certifications.heading} />
|
<Heading title={data.certifications.heading} />
|
||||||
|
|||||||
Reference in New Issue
Block a user