Skip to content

Commit

Permalink
feat(auth/login): Display toast message for role selection during dem…
Browse files Browse the repository at this point in the history
…o login
  • Loading branch information
ad956 committed Aug 14, 2024
1 parent 93d4e79 commit bd1877d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/(pages)/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,15 @@ export default function Login() {
type="button"
className="w-full sm:w-1/3 bg-white text-black font-semibold py-3 rounded-lg border-2 border-black transition duration-300 ease-in-out hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-opacity-50"
onClick={() =>
handleDemoUserLogin(
Array.from(role)[0] as string,
redirectDemoUser
)
!isRoleValid
? toast.error("Please select a role to try the demo.", {
position: "bottom-center",
duration: 2000,
})
: handleDemoUserLogin(
Array.from(role)[0] as string,
redirectDemoUser
)
}
>
Try Demo
Expand Down

0 comments on commit bd1877d

Please sign in to comment.