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

Small bug in React code for Header (Simple links centered) #724

Closed
mplis-ta opened this issue Sep 1, 2021 · 1 comment
Closed

Small bug in React code for Header (Simple links centered) #724

mplis-ta opened this issue Sep 1, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@mplis-ta
Copy link

mplis-ta commented Sep 1, 2021

What component (if applicable)

Describe the bug
One part of the React component uses the wrong variable when creating the element key:

{resources.map((item) => (
    <a
        key={resources.name}
        href={item.href}
        className="text-base font-medium text-gray-900 hover:text-gray-700"
    >
        {item.name}
    </a>
))}

Expected behavior

Code should be:

{resources.map((item) => (
    <a
-        key={resources.name}
+        key={item.name}
        href={item.href}
        className="text-base font-medium text-gray-900 hover:text-gray-700"
    >
        {item.name}
    </a>
))}
@mplis-ta mplis-ta added the bug Something isn't working label Sep 1, 2021
@davidluhr
Copy link
Contributor

@mplis-ta Thank you for reporting this! I've updated the code to ensure that the key uses the correct object name. The fixed version should be live on the site soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants