mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 20:00:25 +00:00
Migrate to TypeScript
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { skeleton } from '../../helpers/utils';
|
||||
|
||||
const Footer = ({ content, loading }) => {
|
||||
if (!content) return null;
|
||||
|
||||
return (
|
||||
<div className="card-body">
|
||||
{loading ? (
|
||||
skeleton({ width: 'w-52', height: 'h-6' })
|
||||
) : (
|
||||
<div dangerouslySetInnerHTML={{ __html: content }} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Footer.propTypes = {
|
||||
content: PropTypes.string,
|
||||
loading: PropTypes.bool.isRequired,
|
||||
};
|
||||
|
||||
export default Footer;
|
||||
23
src/components/footer/index.tsx
Normal file
23
src/components/footer/index.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { skeleton } from '../../utils';
|
||||
|
||||
const Footer = ({
|
||||
content,
|
||||
loading,
|
||||
}: {
|
||||
content: string | null;
|
||||
loading: boolean;
|
||||
}) => {
|
||||
if (!content) return null;
|
||||
|
||||
return (
|
||||
<div className="card-body">
|
||||
{loading ? (
|
||||
skeleton({ widthCls: 'w-52', heightCls: 'h-6' })
|
||||
) : (
|
||||
<div dangerouslySetInnerHTML={{ __html: content }} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Footer;
|
||||
Reference in New Issue
Block a user