Skip to content

Updating main from finishing touches #74

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

Merged
merged 6 commits into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions client/app/auth/change-password/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import useChangePass from "@/hooks/auth/useChangePass";
import { setCookie } from "@/lib/cookieFunctions";
import { message } from "antd";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useEffect, useState } from "react";
Expand All @@ -34,7 +35,7 @@ export default function ChangePassword() {
setTime((time) => {
if (time === 0) {
clearInterval(timer);
alert("Time Expired!");
message.error("Time Expired!");
router.push("/dashboard");
return 0;
} else return time - 0.5;
Expand All @@ -45,7 +46,7 @@ export default function ChangePassword() {
async function submitForm() {

isVerified && (await changePass()) && router.push("/dashboard");
!isVerified && alert("Invalid Captcha!");
!isVerified && message.error("Invalid Captcha!");
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useRouter } from "next/navigation";
import useForgetPassInitiate from "@/hooks/auth/useForgetPassInitiate";
import { useContext, useState } from "react";
import ReCAPTCHA from "react-google-recaptcha";
import { message } from "antd";

function ForgetPassInitiateForm() {
const { userEmail, setUserEmail, initiate } = useForgetPassInitiate();
Expand All @@ -18,7 +19,7 @@ function ForgetPassInitiateForm() {
async function handleFormSubmit(e: React.FormEvent<HTMLFormElement>) {
e.preventDefault();
if (!isCaptchaVerified) {
alert("Please verify that you are not a robot.");
message.warning("Please verify that you are not a robot.");
return;
}
const success = await initiate();
Expand Down
2 changes: 1 addition & 1 deletion client/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const metadata: Metadata = {
title: "EcoSync",
description: "EcoSync is a platform for managing waste in DNCC.",
icons: {
icon: "/logo.png",
icon: "/logoBlack.png",
},
};

Expand Down
Loading