Skip to content

Commit

Permalink
change description of the forget password page
Browse files Browse the repository at this point in the history
  • Loading branch information
muzammil-85 committed Dec 4, 2024
1 parent 5dd3b81 commit 7690f8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app/forgot-password-user/change-password/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function Page() {
});
const router = useRouter()
const { toast } = useToast()
const emailid = Cookies.get('emailid');
async function onSubmit(values: z.infer<typeof formSchema>) {
const phone = Cookies.get('ph');
const apidata = {
Expand Down Expand Up @@ -102,7 +103,7 @@ function Page() {
<Input type="number" {...field} />
</FormControl>
<FormDescription>
We have sent OTP in your registered email address
`We have sent OTP in your registered email address {emailid}`
</FormDescription>
<FormMessage />
</FormItem>
Expand Down
4 changes: 3 additions & 1 deletion src/app/forgot-password-user/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ function Page() {
const response = await axios.post(`${apiURL}/user/forgotPassword`,apidata);
if (response.status === 200) {
Cookies.set("ph", values.phone.toString(), { expires: 1 });
Cookies.set("emailid", response.data.emailId, { expires: 1 });
console.log(response.data.emailId)
toast({
title: "Success",
description: "Password reset link sent to your phone number.",
description: "Password reset link sent to your email address.",
});
router.push(`/forgot-password-user/change-password`);
} else {
Expand Down

0 comments on commit 7690f8e

Please sign in to comment.