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

Dropdown update #102

Merged
merged 3 commits into from
Feb 4, 2025
Merged

Dropdown update #102

merged 3 commits into from
Feb 4, 2025

Conversation

JanProgrammierung
Copy link
Member

This pull request includes several changes to the HeaderComponent in the next-app/src/components/HeaderComponent.tsx file to improve performance and code readability. The most important changes include the use of React.memo for memoization, the addition of useCallback for optimizing callback functions, and various updates to class names and JSX elements for better styling and structure.

Performance improvements:

  • Wrapped HeaderComponent with React.memo to prevent unnecessary re-renders.
  • Added useCallback for toggleMenu and toggleDropdown functions to optimize callback functions.

Code readability and styling updates:

  • Replaced div with header for semantic HTML improvement. [1] [2]
  • Updated class names in JSX elements for better styling and structure, including the use of clsx for conditional class names. [1] [2]
  • Modified the links and dropdownLinks objects to update and reorder the navigation links.

Signed-off-by: JanProgrammierung <jan.lorenz@scilifelab.se>
Signed-off-by: JanProgrammierung <jan.lorenz@scilifelab.se>
@JanProgrammierung JanProgrammierung merged commit c01b537 into dev Feb 4, 2025
4 checks passed
@JanProgrammierung JanProgrammierung deleted the dropdown-update branch February 4, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants