diff --git a/.env.local b/.env.local index a1e6527..49d7333 100644 --- a/.env.local +++ b/.env.local @@ -1,5 +1,5 @@ NEXT_PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1 NEXT_PUBLIC_APPWRITE_PROJECT_ID=67e1445400053dca1d9b NEXT_PUBLIC_APPWRITE_DATABASE_ID=67e1452b00016444b37f -NEXT_PUBLIC_APPWRITE_COLLECTION_ID=67fe4029000f7e0a7b92 -NEXT_PUBLIC_APPWRITE_USERS_COLLECTION_ID=67ff72bd00370366ae3e +NEXT_PUBLIC_APPWRITE_COLLECTION_ID=681c367b0016f9ba0e8e +NEXT_PUBLIC_APPWRITE_USERS_COLLECTION_ID=681c35690038f9798152 diff --git a/src/app/lib/config.js b/src/app/lib/config.js index 68ac91d..7f4fb0e 100644 --- a/src/app/lib/config.js +++ b/src/app/lib/config.js @@ -6,6 +6,6 @@ // lib/config.js export const DATABASE_ID = "67e1452b00016444b37f"; -export const COLLECTION_ID = "67fe4029000f7e0a7b92"; +export const COLLECTION_ID = "681c367b0016f9ba0e8e"; export const SETTINGS_COLLECTION_ID = "settings"; export const AVG_CONSULTATION_KEY = "avg_consultation"; \ No newline at end of file diff --git a/src/app/pages/MultiBooked/page.js b/src/app/pages/MultiBooked/page.js index d8c4b82..16606b0 100644 --- a/src/app/pages/MultiBooked/page.js +++ b/src/app/pages/MultiBooked/page.js @@ -82,7 +82,7 @@ const createEntries = async () => { } setBookings(updatedBookings); - alert(`${validBookings.length} tokens created successfully!`); + // alert(`${validBookings.length} tokens created successfully!`); } catch (error) { console.error("Creation error:", error); setError(error.message); diff --git a/src/app/pages/ResetPasswordPage/page.js b/src/app/pages/ResetPasswordPage/page.js index b34d281..a310d65 100644 --- a/src/app/pages/ResetPasswordPage/page.js +++ b/src/app/pages/ResetPasswordPage/page.js @@ -17,16 +17,24 @@ export default function ResetPasswordPage() { const { darkMode, toggleDarkMode } = useTheme(); const [email, setEmail] = useState(""); const [loading, setLoading] = useState(false); + const [message, setMessage] = useState({ text: "", type: "" }); // type can be "success" or "error" const handleSubmit = async (e) => { e.preventDefault(); setLoading(true); + setMessage({ text: "", type: "" }); try { await account.createRecovery(email, "http://localhost:3000/reset-password"); - alert("Password reset link sent to your email!"); + setMessage({ + text: "Password reset link sent to your email!", + type: "success" + }); } catch (error) { console.error("Error:", error); - alert(`Failed to send reset link: ${error.message}`); + setMessage({ + text: `Failed to send reset link: ${error.message}`, + type: "error" + }); } finally { setLoading(false); } @@ -53,6 +61,15 @@ export default function ResetPasswordPage() {
Enter your email address linked to your account, and we'll send you a link to reset your password.
+ {message.text && ( +