mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 12:27:17 +00:00
Updated code after code review
This commit is contained in:
@@ -2,33 +2,16 @@ import PropTypes from 'prop-types';
|
||||
|
||||
import { skeleton } from '../../helpers/utils';
|
||||
|
||||
const DefaultFooter = () => {
|
||||
return (
|
||||
<a
|
||||
href="https://github.com/arifszn/gitprofile"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<div>
|
||||
<p className="font-mono text-sm">
|
||||
Made with <span className="text-primary">GitProfile</span> and ❤️
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
);
|
||||
};
|
||||
|
||||
const Footer = ({ content, loading }) => {
|
||||
let footerContent = null;
|
||||
if (content) {
|
||||
footerContent = <div dangerouslySetInnerHTML={{ __html: content }} />;
|
||||
} else {
|
||||
footerContent = <DefaultFooter />;
|
||||
}
|
||||
if (!content) return null;
|
||||
|
||||
return (
|
||||
<div className="card-body">
|
||||
{loading ? skeleton({ width: 'w-52', height: 'h-6' }) : footerContent}
|
||||
{loading ? (
|
||||
skeleton({ width: 'w-52', height: 'h-6' })
|
||||
) : (
|
||||
<div dangerouslySetInnerHTML={{ __html: content }} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user