Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update copyright notice to dynamically display current year #111

Merged
merged 1 commit into from
May 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 50 additions & 40 deletions src/Components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,44 +1,54 @@
import React, { useContext } from 'react'
import './Footer.css'
import footer_logo from '../Assets/logo_big.png'
import instagram_icon from '../Assets/instagram_icon.png'
import pintester_icon from '../Assets/pintester_icon.png'
import whatsapp_icon from '../Assets/whatsapp_icon.png'
import { Link } from 'react-router-dom'
import { ShopContext } from '../../Context/ShopContext'
import React, { useContext } from "react";
import "./Footer.css";
import footer_logo from "../Assets/logo_big.png";
import instagram_icon from "../Assets/instagram_icon.png";
import pintester_icon from "../Assets/pintester_icon.png";
import whatsapp_icon from "../Assets/whatsapp_icon.png";
import { Link } from "react-router-dom";
import { ShopContext } from "../../Context/ShopContext";

const Footer = () => {
const {theme}=useContext(ShopContext);
return (
<div className='footer'>
<div className="footer-logo">
<img src={footer_logo} alt="" />
<p className={`footer_${theme}`}>ShopNex</p>
</div>
<ul className={'footer-links_'+theme}>
<li>Company</li>
<li>Products</li>
<li>Offices</li>
<li> <Link className={`link_${theme}`} to='/about'>About</Link></li>
<li> <Link className={`link_${theme}`} to='/contact'>Contact Us</Link></li>
</ul>
<div className="footer-social-icon">
<div className="footer-icons-container">
<img src={instagram_icon} alt="" />
</div>
<div className="footer-icons-container">
<img src={pintester_icon} alt="" />
</div>
<div className="footer-icons-container">
<img src={whatsapp_icon} alt="" />
</div>
</div>
<div className={`footer-copyright_${theme}`}>
<hr className={`hr_${theme}`} />
<p>Copyright @ 2023 - All Rights Reserved</p>
</div>
const { theme } = useContext(ShopContext);
return (
<div className="footer">
<div className="footer-logo">
<img src={footer_logo} alt="" />
<p className={`footer_${theme}`}>ShopNex</p>
</div>
<ul className={"footer-links_" + theme}>
<li>Company</li>
<li>Products</li>
<li>Offices</li>
<li>
{" "}
<Link className={`link_${theme}`} to="/about">
About
</Link>
</li>
<li>
{" "}
<Link className={`link_${theme}`} to="/contact">
Contact Us
</Link>
</li>
</ul>
<div className="footer-social-icon">
<div className="footer-icons-container">
<img src={instagram_icon} alt="" />
</div>
)
}
<div className="footer-icons-container">
<img src={pintester_icon} alt="" />
</div>
<div className="footer-icons-container">
<img src={whatsapp_icon} alt="" />
</div>
</div>
<div className={`footer-copyright_${theme}`}>
<hr className={`hr_${theme}`} />
<p>Copyright @ {new Date().getFullYear()} - All Rights Reserved</p>
</div>
</div>
);
};

export default Footer
export default Footer;
Loading