Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions package-lock.json

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

27 changes: 26 additions & 1 deletion src/Pages/Landing page/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from "react";
import { Link } from "react-router-dom";
import { Menu, X } from "lucide-react";
import { Menu, X, Github } from "lucide-react";
import { Button } from "@/components/ui/button";
import YourLogo from "@/assets/38881995.png"; // Update this import path to your logo

Expand Down Expand Up @@ -146,6 +146,19 @@ const Navbar: React.FC = () => {
<div className="hidden md:flex items-center space-x-8">
<NavLink to="/">Home</NavLink>

{/* GitHub Repository Link */}
<a
href="https://github.com/AOSSIE-Org/PictoPy"
target="_blank"
rel="noopener noreferrer"
className="text-gray-800 dark:text-gray-300
hover:text-black dark:hover:text-white
transition-colors duration-300"
aria-label="AOSSIE PictoPy GitHub Repository"
>
<Github className="h-5 w-5" />
</a>
Comment on lines +149 to +160
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider extracting the GitHub URL to a constant.

The GitHub repository URL https://github.com/AOSSIE-Org/PictoPy is duplicated in both the desktop (line 151) and mobile (line 211) navigation sections. Extracting it to a constant improves maintainability.

♻️ Proposed refactor

Add a constant at the top of the component or in a shared constants file:

const GITHUB_REPO_URL = "https://github.com/AOSSIE-Org/PictoPy";

Then reference it in both links:

 <a
-  href="https://github.com/AOSSIE-Org/PictoPy"
+  href={GITHUB_REPO_URL}
   target="_blank"

Also applies to: 210-221

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Pages/Landing` page/Navbar.tsx around lines 149 - 160, Extract the
duplicated GitHub URL string into a single constant (e.g., GITHUB_REPO_URL) and
replace the hard-coded URL in both anchor tags in the Navbar component so both
desktop and mobile links reference that constant; add the constant near the top
of Navbar.tsx (or in a shared constants file) and update the href attributes in
the anchors that render the Github icon to use GITHUB_REPO_URL.


{/* Dark Mode Toggle Button */}
<button
onClick={() => setDarkMode(!darkMode)}
Expand Down Expand Up @@ -194,6 +207,18 @@ const Navbar: React.FC = () => {
<NavLink to="/" onClick={() => setIsOpen(false)}>
Home
</NavLink>
<a
href="https://github.com/AOSSIE-Org/PictoPy"
target="_blank"
rel="noopener noreferrer"
className="text-gray-700 dark:text-gray-300 text-lg font-medium
hover:text-black dark:hover:text-white
transition duration-300 flex items-center space-x-2"
onClick={() => setIsOpen(false)}
>
<Github className="h-5 w-5" />
<span>GitHub</span>
</a>
Comment on lines +210 to +221
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Externalize the user-visible string for i18n.

The "GitHub" text on line 220 is hardcoded. Per coding guidelines, user-visible strings should be externalized to resource files for internationalization.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Pages/Landing` page/Navbar.tsx around lines 210 - 221, The "GitHub" label
in the Navbar anchor is hardcoded; update the Navbar component to use the i18n
resource lookup instead (e.g., t('github') or a shared strings object) in place
of the literal "GitHub", add the corresponding key ("github": "GitHub") to the
translation/resource files for supported locales, and ensure the anchor still
calls setIsOpen(false) and renders the Github icon component exactly as before;
also provide a sensible fallback if the i18n key is missing.

<NavLink to="#features" isScrollLink={true} onClick={() => setIsOpen(false)}>
Feature
</NavLink>
Expand Down