Validate missing prop types
This commit is contained in:
parent
a2ada305a7
commit
ec458191fb
@ -3,4 +3,4 @@ module.exports = {
|
|||||||
tailwindcss: {},
|
tailwindcss: {},
|
||||||
autoprefixer: {},
|
autoprefixer: {},
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { skeleton } from '../../helpers/utils';
|
import { fallbackImage, skeleton } from '../../helpers/utils';
|
||||||
import LazyImage from '../lazy-image';
|
import LazyImage from '../lazy-image';
|
||||||
|
|
||||||
const AvatarCard = ({ profile, loading }) => {
|
const AvatarCard = ({ profile, loading }) => {
|
||||||
@ -54,6 +54,7 @@ const AvatarCard = ({ profile, loading }) => {
|
|||||||
|
|
||||||
AvatarCard.propTypes = {
|
AvatarCard.propTypes = {
|
||||||
profile: PropTypes.object,
|
profile: PropTypes.object,
|
||||||
|
loading: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default AvatarCard;
|
export default AvatarCard;
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import { getDevtoArticle, getMediumArticle } from 'article-api';
|
import { getDevtoArticle, getMediumArticle } from 'article-api';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Fragment, useEffect, useState } from 'react';
|
import { Fragment, useEffect, useState } from 'react';
|
||||||
import { CgHashtag } from 'react-icons/cg';
|
|
||||||
import config from '../../ezprofile.config';
|
import config from '../../ezprofile.config';
|
||||||
import { ga, skeleton } from '../../helpers/utils';
|
import { ga, skeleton } from '../../helpers/utils';
|
||||||
import LazyImage from '../lazy-image';
|
import LazyImage from '../lazy-image';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
const displaySection = () => {
|
const displaySection = () => {
|
||||||
if (
|
if (
|
||||||
@ -201,4 +201,8 @@ const Blog = ({ loading }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Blog.propTypes = {
|
||||||
|
loading: PropTypes.bool,
|
||||||
|
};
|
||||||
|
|
||||||
export default Blog;
|
export default Blog;
|
||||||
|
|||||||
@ -189,6 +189,15 @@ const Details = ({ profile, loading }) => {
|
|||||||
|
|
||||||
Details.propTypes = {
|
Details.propTypes = {
|
||||||
profile: PropTypes.object,
|
profile: PropTypes.object,
|
||||||
|
loading: PropTypes.bool,
|
||||||
|
};
|
||||||
|
|
||||||
|
ListItem.propTypes = {
|
||||||
|
icon: PropTypes.node,
|
||||||
|
title: PropTypes.node,
|
||||||
|
value: PropTypes.node,
|
||||||
|
link: PropTypes.string,
|
||||||
|
skeleton: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Details;
|
export default Details;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { GoPrimitiveDot } from 'react-icons/go';
|
|
||||||
import { skeleton } from '../../helpers/utils';
|
import { skeleton } from '../../helpers/utils';
|
||||||
import config from '../../ezprofile.config';
|
import config from '../../ezprofile.config';
|
||||||
import { Fragment } from 'react';
|
import { Fragment } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
const ListItem = ({ time, degree, institution }) => (
|
const ListItem = ({ time, degree, institution }) => (
|
||||||
<li className="mb-5 ml-4">
|
<li className="mb-5 ml-4">
|
||||||
@ -79,4 +79,14 @@ const Education = ({ loading }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Education.propTypes = {
|
||||||
|
loading: PropTypes.bool,
|
||||||
|
};
|
||||||
|
|
||||||
|
ListItem.propTypes = {
|
||||||
|
time: PropTypes.node,
|
||||||
|
degree: PropTypes.node,
|
||||||
|
institution: PropTypes.node,
|
||||||
|
};
|
||||||
|
|
||||||
export default Education;
|
export default Education;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { GoPrimitiveDot } from 'react-icons/go';
|
|
||||||
import { skeleton } from '../../helpers/utils';
|
import { skeleton } from '../../helpers/utils';
|
||||||
import config from '../../ezprofile.config';
|
import config from '../../ezprofile.config';
|
||||||
import { Fragment } from 'react';
|
import { Fragment } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
const ListItem = ({ time, position, company }) => (
|
const ListItem = ({ time, position, company }) => (
|
||||||
<li className="mb-5 ml-4">
|
<li className="mb-5 ml-4">
|
||||||
@ -79,4 +79,14 @@ const Experience = ({ loading }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ListItem.propTypes = {
|
||||||
|
time: PropTypes.node,
|
||||||
|
position: PropTypes.node,
|
||||||
|
company: PropTypes.node,
|
||||||
|
};
|
||||||
|
|
||||||
|
Experience.propTypes = {
|
||||||
|
loading: PropTypes.bool,
|
||||||
|
};
|
||||||
|
|
||||||
export default Experience;
|
export default Experience;
|
||||||
|
|||||||
@ -31,9 +31,9 @@ const HeadTagEditor = ({ profile, theme }) => {
|
|||||||
|
|
||||||
<meta name="description" content={profile.bio} />
|
<meta name="description" content={profile.bio} />
|
||||||
|
|
||||||
<meta itemprop="name" content={`Portfolio of ${profile.name}`} />
|
<meta itemProp="name" content={`Portfolio of ${profile.name}`} />
|
||||||
<meta itemprop="description" content={profile.bio} />
|
<meta itemProp="description" content={profile.bio} />
|
||||||
<meta itemprop="image" content={profile.avatar} />
|
<meta itemProp="image" content={profile.avatar} />
|
||||||
|
|
||||||
<meta
|
<meta
|
||||||
property="og:url"
|
property="og:url"
|
||||||
@ -60,6 +60,7 @@ const HeadTagEditor = ({ profile, theme }) => {
|
|||||||
|
|
||||||
HeadTagEditor.propTypes = {
|
HeadTagEditor.propTypes = {
|
||||||
profile: PropTypes.object,
|
profile: PropTypes.object,
|
||||||
|
theme: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default HeadTagEditor;
|
export default HeadTagEditor;
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { useState, Fragment, useEffect } from 'react';
|
import { useState, Fragment, useEffect } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
const LazyImage = ({ placeholder, src, alt, ...rest }) => {
|
const LazyImage = ({ placeholder, src, alt, ...rest }) => {
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
@ -19,4 +20,10 @@ const LazyImage = ({ placeholder, src, alt, ...rest }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
LazyImage.propTypes = {
|
||||||
|
placeholder: PropTypes.node,
|
||||||
|
alt: PropTypes.string,
|
||||||
|
src: PropTypes.string,
|
||||||
|
};
|
||||||
|
|
||||||
export default LazyImage;
|
export default LazyImage;
|
||||||
|
|||||||
@ -167,6 +167,7 @@ const Project = ({ repo, loading }) => {
|
|||||||
|
|
||||||
Project.propTypes = {
|
Project.propTypes = {
|
||||||
repo: PropTypes.array,
|
repo: PropTypes.array,
|
||||||
|
loading: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Project;
|
export default Project;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import config from '../../ezprofile.config';
|
import config from '../../ezprofile.config';
|
||||||
import { skeleton } from '../../helpers/utils';
|
import { skeleton } from '../../helpers/utils';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
const Skill = ({ loading }) => {
|
const Skill = ({ loading }) => {
|
||||||
const renderSkeleton = () => {
|
const renderSkeleton = () => {
|
||||||
@ -50,4 +51,8 @@ const Skill = ({ loading }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Skill.propTypes = {
|
||||||
|
loading: PropTypes.bool,
|
||||||
|
};
|
||||||
|
|
||||||
export default Skill;
|
export default Skill;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { AiOutlineControl } from 'react-icons/ai';
|
import { AiOutlineControl } from 'react-icons/ai';
|
||||||
import { skeleton } from '../../helpers/utils';
|
import { skeleton } from '../../helpers/utils';
|
||||||
import config from '../../ezprofile.config';
|
import config from '../../ezprofile.config';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
const ThemeChanger = ({ theme, setTheme, loading }) => {
|
const ThemeChanger = ({ theme, setTheme, loading }) => {
|
||||||
const changeTheme = (e, selectedTheme) => {
|
const changeTheme = (e, selectedTheme) => {
|
||||||
@ -88,4 +89,10 @@ const ThemeChanger = ({ theme, setTheme, loading }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ThemeChanger.propTypes = {
|
||||||
|
theme: PropTypes.string,
|
||||||
|
setTheme: PropTypes.func,
|
||||||
|
loading: PropTypes.bool,
|
||||||
|
};
|
||||||
|
|
||||||
export default ThemeChanger;
|
export default ThemeChanger;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user