Migrate to TypeScript

This commit is contained in:
Ariful Alam
2024-01-20 18:24:26 +06:00
parent fdf75dabeb
commit aa4c6928d6
53 changed files with 4415 additions and 2661 deletions

View File

@@ -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;

View 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;