mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 12:27:17 +00:00
Validate missing prop types
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useState, Fragment, useEffect } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const LazyImage = ({ placeholder, src, alt, ...rest }) => {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user