Skip to content

Centralize hardcoded and repeated URLs #115

@aniket866

Description

@aniket866

🐛 Describe the bug

1. Redundant Code: The codebase repeats the same external URLs for social and project links in multiple places instead of defining them once.

2. Important URLs like the GitHub repo and the AOSSIE homepage are hardcoded as strings again and again.

3. This repetition occurs across at least four different component files: Navbar.js, Hero.js, About.js, and Footer.js.

4. Hard to Maintain: If a URL ever changes, you have to find and fix every single instance of it manually.

5. Risk of Errors: It's easy to miss one instance when updating, leading to broken or inconsistent links on the site..

PROPOSED SOLUTION:

  • Create a "Truth" File: Make a new single file, like src/constants/urls.js, to hold all external links.

  • Define Variables: Inside that file, save each URL string to a clear variable name (e.g., GITHUB_URL).

  • Use Everywhere: Import those variables into your components and use them instead of the hardcoded URL strings.

@M4dhav wants to work on this Please assign

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions