Skip to content
Open
Show file tree
Hide file tree
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
109 changes: 86 additions & 23 deletions components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Link from "next/link"
import Image from "next/image"

const navigation = [
{
Expand Down Expand Up @@ -105,32 +106,94 @@ const navigation = [
},
]

const footerLinks = [
{ name: "Blockchains", href: "/blockchains" },
{ name: "Protocols", href: "/protocols" },
{ name: "Research", href: "/research" },
{ name: "Workshop", href: "https://workshop.stability.nexus" },
{ name: "Hackathon", href: "https://hackathon.stability.nexus" },
{ name: "Articles", href: "https://news.stability.nexus/" },
{ name: "Docs", href: "https://docs.stability.nexus/" },
]

export default function Footer() {
return (
<footer className="p-10">
<div className="flex items-center justify-between">
{/*
<Image
unoptimized
fetchPriority="high"
loading="lazy"
src="./logo.png"
alt="Stability Nexus Logo"
height={65}
width={65}
/>
*/}
<div className="flex items-center space-x-4 md:order-2">
{navigation.map((item) => (
<Link
key={item.name}
href={item.href}
className=" rounded-full bg-secondary/30 p-2 hover:bg-secondary"
>
<span className="sr-only">{item.name}</span>
<item.icon className="size-6" aria-hidden="true" />
<footer className="bg-white dark:bg-gray-900 border-t border-gray-200 dark:border-gray-800">
<div className="mx-auto max-w-7xl px-6 py-12 lg:px-8">
<div className="xl:grid xl:grid-cols-3 xl:gap-8">
<div className="space-y-8">
<Link href="/" className="flex items-center space-x-2">
<Image
unoptimized
src="./logo.png"
alt="Stability Nexus Logo"
width={40}
height={40}
className="h-10 w-auto"
/>
Comment on lines +126 to +133
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Image source path may not resolve correctly.

The relative path ./logo.png may not work as expected with Next.js Image component. For static assets, use an absolute path from the public directory.

🔎 Proposed fix
              <Image
                unoptimized
-               src="./logo.png"
+               src="/logo.png"
                alt="Stability Nexus Logo"
                width={40}
                height={40}
                className="h-10 w-auto"
              />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Image
unoptimized
src="./logo.png"
alt="Stability Nexus Logo"
width={40}
height={40}
className="h-10 w-auto"
/>
<Image
unoptimized
src="/logo.png"
alt="Stability Nexus Logo"
width={40}
height={40}
className="h-10 w-auto"
/>
🤖 Prompt for AI Agents
In components/footer.tsx around lines 126 to 133, the Image src uses a relative
path "./logo.png" which may not resolve with Next.js Image; change the src to an
absolute path from the public directory (e.g. "/logo.png") or import the image
as a module and pass the imported value to Image, and ensure the logo file is
placed in the project's public folder if using the absolute path.

<span className="text-2xl font-bold text-gray-900 dark:text-white">
Stability Nexus
</span>
</Link>
))}
<p className="text-sm leading-6 text-gray-600 dark:text-gray-400">
Building a more stable world through emerging technologies.
</p>
<div className="flex space-x-6">
{navigation.map((item) => (
<Link
key={item.name}
href={item.href}
className="text-gray-400 hover:text-gray-500"
>
<span className="sr-only">{item.name}</span>
<item.icon className="size-6" aria-hidden="true" />
</Link>
))}
Comment on lines +143 to +151
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

External links should open in new tabs with security attributes.

Social media links point to external sites but lack target="_blank" and rel="noopener noreferrer". Users typically expect external links to open in new tabs, and the rel attribute prevents potential security issues.

🔎 Proposed fix
              {navigation.map((item) => (
                <Link
                  key={item.name}
                  href={item.href}
+                 target="_blank"
+                 rel="noopener noreferrer"
                  className="text-gray-400 hover:text-gray-500"
                >
                  <span className="sr-only">{item.name}</span>
                  <item.icon className="size-6" aria-hidden="true" />
                </Link>
              ))}

Consider the same change for the external footerLinks (Workshop, Hackathon, Articles, Docs) at lines 163-168 and 180-185.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Link
key={item.name}
href={item.href}
className="text-gray-400 hover:text-gray-500"
>
<span className="sr-only">{item.name}</span>
<item.icon className="size-6" aria-hidden="true" />
</Link>
))}
<Link
key={item.name}
href={item.href}
target="_blank"
rel="noopener noreferrer"
className="text-gray-400 hover:text-gray-500"
>
<span className="sr-only">{item.name}</span>
<item.icon className="size-6" aria-hidden="true" />
</Link>
))}
🤖 Prompt for AI Agents
In components/footer.tsx around lines 143-151 (and also update footer link
usages at 163-168 and 180-185), the social and external footer links are missing
target and rel attributes; update each external Link to include target="_blank"
and rel="noopener noreferrer" so they open in a new tab and avoid window.opener
security issues, and ensure the attributes are applied to the rendered anchor
(for Next.js Link, pass target and rel through Link or add them to the inner <a>
depending on your Link usage).

</div>
</div>
<div className="mt-16 grid grid-cols-2 gap-8 xl:col-span-2 xl:mt-0">
<div className="md:grid md:grid-cols-2 md:gap-8">
<div>
<h3 className="text-sm font-semibold leading-6 text-gray-900 dark:text-white">
Resources
</h3>
<ul role="list" className="mt-6 space-y-4">
{footerLinks.slice(0, 4).map((item) => (
<li key={item.name}>
<Link
href={item.href}
className="text-sm leading-6 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white"
>
{item.name}
</Link>
</li>
))}
</ul>
</div>
<div className="mt-10 md:mt-0">
<h3 className="text-sm font-semibold leading-6 text-gray-900 dark:text-white">
More
</h3>
<ul role="list" className="mt-6 space-y-4">
{footerLinks.slice(4).map((item) => (
<li key={item.name}>
<Link
href={item.href}
className="text-sm leading-6 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white"
>
{item.name}
</Link>
</li>
))}
</ul>
</div>
</div>
</div>
</div>
<div className="mt-16 border-t border-gray-900/10 pt-8 sm:mt-20 lg:mt-24">
<p className="text-xs leading-5 text-gray-500">
&copy; {new Date().getFullYear()} Stability Nexus. All rights reserved.
</p>
</div>
</div>
</footer>
Expand Down
15 changes: 13 additions & 2 deletions output/build-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"polyfillFiles": [
"static/chunks/polyfills.js"
],
"devFiles": [],
"devFiles": [
"static/chunks/react-refresh.js"
],
"ampDevFiles": [],
"lowPriorityFiles": [
"static/development/_buildManifest.js",
Expand All @@ -13,7 +15,16 @@
"static/chunks/main-app.js"
],
"pages": {
"/_app": []
"/_app": [
"static/chunks/webpack.js",
"static/chunks/main.js",
"static/chunks/pages/_app.js"
],
"/_error": [
"static/chunks/webpack.js",
"static/chunks/main.js",
"static/chunks/pages/_error.js"
]
},
"ampFirstPages": []
}
2 changes: 1 addition & 1 deletion output/server/middleware-build-manifest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion output/server/pages-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
{}
{
"/_error": "pages/_error.js",
"/_app": "pages/_app.js",
"/_document": "pages/_document.js"
}
2 changes: 1 addition & 1 deletion output/static/development/_buildManifest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.