diff --git a/client/pages/community/MentorApply.tsx b/client/pages/community/MentorApply.tsx index bbd83714..59a7e053 100644 --- a/client/pages/community/MentorApply.tsx +++ b/client/pages/community/MentorApply.tsx @@ -16,11 +16,12 @@ import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Switch } from "@/components/ui/switch"; import { Textarea } from "@/components/ui/textarea"; -import { useNavigate } from "react-router-dom"; +import { useLocation, useNavigate } from "react-router-dom"; export default function MentorApply() { - const { user, loading } = useAuth(); + const { user } = useAuth(); const navigate = useNavigate(); + const location = useLocation(); const [bio, setBio] = useState(""); const [expertise, setExpertise] = useState([]); const [expertiseInput, setExpertiseInput] = useState(""); @@ -28,15 +29,7 @@ export default function MentorApply() { const [hourlyRate, setHourlyRate] = useState(""); const [submitting, setSubmitting] = useState(false); - useEffect(() => { - if (!loading && !user) { - aethexToast.info({ - title: "Sign in required", - description: "Please sign in to apply as a mentor", - }); - navigate("/login"); - } - }, [user, loading, navigate]); + // Show inline sign-in prompt instead of redirecting away const addExpertise = () => { const parts = expertiseInput @@ -102,111 +95,137 @@ export default function MentorApply() {

- - - Mentor profile - - Tell mentees how you can help and set your availability. - - - -
-
- -