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

fix(footer-#49): display dynamic date, ensure all link are functional #58

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
15 changes: 15 additions & 0 deletions app/components/Footer.ts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the correct links.

Twitter: https://twitter.com/auto_swappr
Telegram: https://t.co/yFNm0juRkX
Github: https://github.com/BlockheaderWeb3-Community/autoswappr-dapp
Documentation: /documentation

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { IconType } from "react-icons";
import { FaTelegramPlane } from "react-icons/fa";
import { FaXTwitter } from "react-icons/fa6";
import { FiGithub } from "react-icons/fi";

export const footerIcon: { icons: IconType; path: string }[] = [
{ icons: FiGithub, path: "#" },
{ icons: FaTelegramPlane, path: "#" },
{ icons: FaXTwitter, path: "#" },
];

export const footerDocumentation: { name: string; path: string }[] = [
{name: 'Team', path: '#'},
{name: 'Documentation', path: '#'},
];
50 changes: 22 additions & 28 deletions app/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,49 +1,43 @@
import React from "react";
import Image from "next/image";
import { footerDocumentation, footerIcon } from "./Footer";

const Footer = () => {
const date = new Date().getFullYear();
return (
<footer className="flex flex-col-reverse md:flex-row justify-between items-center w-full min-h-[100px] bg-[#000014] px-4 md:px-8 lg:px-20 py-6 md:py-0 gap-6 md:gap-4">
{/* Copyright section */}
<div className="text-center md:text-left">
<p className="text-sm md:text-base text-gray-600">
copyright@Autoswappr2024
copyright@Autoswappr {date}
</p>
</div>

{/* Social icons section */}
<div className="flex items-center gap-6">
<Image
className="w-4 h-4 md:w-5 md:h-5 hover:opacity-80 cursor-pointer"
src="git.svg"
alt="GitHub"
width="4"
height="4"
/>
<Image
className="w-4 h-4 md:w-5 md:h-5 hover:opacity-80 cursor-pointer"
src="telegram.svg"
alt="Telegram"
width="4"
height="4"
/>
<Image
className="w-4 h-4 md:w-5 md:h-5 hover:opacity-80 cursor-pointer"
src="x.svg"
alt="X (Twitter)"
width="4"
height="4"
/>
{footerIcon.map((icon, index) => (
<a
key={index}
href={icon.path}
className="text-sm md:text-xl hover:opacity-80 cursor-pointer"
>
<icon.icons />
{/* w-4 h-4 md:w-5 md:h-5 */}
</a>
))}
</div>

{/* Navigation section */}
<div className="flex flex-row items-center gap-4 md:gap-8">
<p className="text-sm md:text-base hover:opacity-80 cursor-pointer">
Team
</p>
<p className="text-sm md:text-base hover:opacity-80 cursor-pointer">
Documentation
</p>
{footerDocumentation.map((doc, index) => (
<a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use NextJS link tag here

key={index}
href={doc.path}
className="text-sm md:text-base hover:opacity-80 cursor-pointer"
>
{doc.name}
</a>
))}
</div>
</footer>
);
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"next": "15.0.3",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-icons": "^5.4.0",
"starknet": "6.11.0"
},
"devDependencies": {
Expand Down
Loading
Loading