is this the correct way to add the copyright, if not then corect it "import React, {…
- User
is this the correct way to add the copyright, if not then corect it "import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import { Icon } from '@components/icons'; import { socialMedia } from '@config';
const StyledFooter = styled.footer
${({ theme }) => theme.mixins.flexCenter}; flex-direction: column; height: auto; min-height: 70px; padding: 15px; text-align: center;;const StyledSocialLinks = styled.div` display: none;
@media (max-width: 768px) { display: block; width: 100%; max-width: 270px; margin: 0 auto 10px; color: var(--light-slate); }
ul { ${({ theme }) => theme.mixins.flexBetween}; padding: 0; margin: 0; list-style: none;
codea { padding: 10px; svg { width: 20px; height: 20px; } }} `;
const StyledCredit = styled.div` color: var(--light-slate); font-family: var(--font-mono); font-size: var(--fz-xxs); line-height: 1;
a { padding: 10px; }
.github-stats { margin-top: 10px;
code& > span { display: inline-flex; align-items: center; margin: 0 7px; } svg { display: inline-block; margin-right: 5px; width: 14px; height: 14px; }} `;
const Footer = () => { const [githubInfo, setGitHubInfo] = useState({ stars: null, forks: null, });
useEffect(() => { if (process.env.NODE_ENV !== 'production') { return; } fetch('https://api.github.com/ai-apex-dev') .then(response => response.json()) .then(json => { const { stargazers_count, forks_count } = json; setGitHubInfo({ stars: stargazers_count, forks: forks_count, }); }) .catch(e => console.error(e)); }, []);
return ( {socialMedia && socialMedia.map(({ name, url }, i) => ( ))}
code<StyledCredit tabindex="-1"> <a href="https://github.com/ai-apex-dev"> <div>Designed and Developed by Sharukhali Syed | Copyright ©2024</div> {githubInfo.stars && githubInfo.forks && ( <div className="github-stats"> <span> <Icon name="Star" /> <span>{githubInfo.stars.toLocaleString()}</span> </span> <span> <Icon name="Fork" /> <span>{githubInfo.forks.toLocaleString()}</span> </span> </div> )} </a> </StyledCredit> </StyledFooter> - Assistant