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

Make the "Become a Mentor" button responsive. #72

Merged
merged 22 commits into from
Jan 14, 2024

Conversation

mayura-andrew
Copy link
Member

Purpose

The purpose of this PR is to fix #71

Purpose

The purpose of this PR is to make the "Become a Mentor" button responsive.

Goals

This PR makes the "Become a Mentor" button responsive using Tailwind CSS. It also attempts to fix an issue where the application does not navigate to the /mentor-registration route when the button is clicked in mobile view.

Approach

I updated the handleMentorRegistration function in the MenuDrawer.tsx file to navigate to the /mentor-registration route when the "Become a Mentor" button is clicked. However, this does not seem to be working as expected on mobile devices. I would appreciate if someone could look into this.

Screenshots

Screencast_20240113_161026.webm

Checklist

  • This PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.
  • I have read and understood the development best practices guidelines ( http://bit.ly/sef-best-practices )
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Related PRs

N/A

Test environment

OS - Fedora Linux 39 (KDE Plasma) x86_64
NodeJS - 20.10.0

Learning

I learned about the importance of making UI elements responsive to ensure a good user experience on all devices. I also learned about the navigate function and how it can be used to programmatically navigate to different routes in a React application.

};

const handleMentorRegistration = (): void => {
console.log('Clicked');
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
console.log('Clicked');

@@ -18,6 +24,11 @@ interface MenuDrawerProps {
}

const MenuDrawer: React.FC<MenuDrawerProps> = ({ openMenu, setOpenMenu }) => {
const [isLoginModalVisible, setIsLoginModalVisible] = useState(false);
Copy link
Member

Choose a reason for hiding this comment

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

We don't need it use openMenu, setOpenMenu

Copy link
Member Author

Choose a reason for hiding this comment

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

Screencast_20240114_003851.webm

Fixed that issue :)

Copy link
Member

@anjula-sack anjula-sack left a comment

Choose a reason for hiding this comment

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

Good job! @mayura-andrew

@anjula-sack anjula-sack merged commit 1e6aca2 into sef-global:main Jan 14, 2024
2 checks passed
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.

The "Become a mentor" button is not properly responsive on mobile devices.
2 participants