refactor(Copyright): modernize component and add dynamic year
- Convert from function to React.memo for better performance - Replace hardcoded year with dynamic current year calculation - Update styling classes to use Tailwind format - Add hover states to improve UX - Add rel="noopener noreferrer" for security best practices - Change container from div to semantic footer element Signed-off-by: Shekar Siri <sshekarsiri@gmail.com>
This commit is contained in:
parent
9bb93d5daa
commit
f965c69a26
1 changed files with 10 additions and 7 deletions
|
|
@ -1,11 +1,14 @@
|
|||
import React from 'react';
|
||||
|
||||
function Copyright() {
|
||||
return (
|
||||
<div className="fixed bottom-0 m-auto text-center mb-6 color-gray-medium">
|
||||
© 2025 OpenReplay. All rights reserved. <a className="underline" href="https://openreplay.com/privacy.html" target="_blank">Privacy</a> and <a className="underline" href="https://openreplay.com/terms.html" target="_blank">Terms</a>.
|
||||
</div>
|
||||
);
|
||||
}
|
||||
const Copyright = React.memo(() => {
|
||||
const currentYear = new Date().getFullYear();
|
||||
return (
|
||||
<footer className="fixed bottom-0 m-auto text-center mb-6 text-gray-500">
|
||||
© {currentYear} OpenReplay. All rights reserved.{' '}
|
||||
<a className="underline hover:text-gray-700" href="https://openreplay.com/privacy.html" target="_blank" rel="noopener noreferrer">Privacy</a> and{' '}
|
||||
<a className="underline hover:text-gray-700" href="https://openreplay.com/terms.html" target="_blank" rel="noopener noreferrer">Terms</a>.
|
||||
</footer>
|
||||
);
|
||||
});
|
||||
|
||||
export default Copyright;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue