Signing you in...
;
+}
diff --git a/frontend/src/pages/RegisterPage.jsx b/frontend/src/pages/RegisterPage.jsx
index fec46f5..8857c02 100644
--- a/frontend/src/pages/RegisterPage.jsx
+++ b/frontend/src/pages/RegisterPage.jsx
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
import { Link } from 'react-router-dom';
import useAuth from '../hooks/useAuth';
import PasswordInput from '../components/PasswordInput';
+import startOAuth from '../hooks/useAuth';
export default function RegisterPage() {
const [email, setEmail] = useState('');
@@ -57,7 +58,7 @@ export default function RegisterPage() {
return (
-
+
Paisable
@@ -92,6 +93,28 @@ export default function RegisterPage() {
Create Account
+
+
+ or sign in using
+
+
+
+
+
+
+
+
+
Already have an account?
diff --git a/frontend/src/utils/logoutHelper.js b/frontend/src/utils/logoutHelper.js
new file mode 100644
index 0000000..07b9dc3
--- /dev/null
+++ b/frontend/src/utils/logoutHelper.js
@@ -0,0 +1,16 @@
+import clearAuthToken from '../api/axios';
+// frontend/src/utils/logoutHelper.js
+// simple helper to call window location or dispatch a custom event the AuthContext listens to
+
+export function logout() {
+ // simplest: reload to /login and clear token
+ try {
+ localStorage.removeItem('token');
+ clearAuthToken();
+ // Optionally broadcast an event for AuthContext to pick up
+ window.dispatchEvent(new Event('app:logout'));
+ } finally {
+ // navigate to login page explicitly
+ window.location.href = '/login';
+ }
+}