aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/pages
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-10-26 21:17:06 -0700
committerPinapelz <yukais@pinapelz.com>2025-10-26 21:17:06 -0700
commit82bc6b860598103af46030d875b82da239dc999d (patch)
tree33c0ff88e86ce3a94ba2a7c07f79cae0d7730dac /frontend/src/pages
parent00ffea6a46890bdeac160f8a35b91a7d9298b721 (diff)
stub profile page
Diffstat (limited to 'frontend/src/pages')
-rw-r--r--frontend/src/pages/Profile.tsx39
1 files changed, 39 insertions, 0 deletions
diff --git a/frontend/src/pages/Profile.tsx b/frontend/src/pages/Profile.tsx
new file mode 100644
index 0000000..03fef48
--- /dev/null
+++ b/frontend/src/pages/Profile.tsx
@@ -0,0 +1,39 @@
+import { useNavigate } from 'react-router';
+import LoadingDisplay from "../components/displays/LoadingDisplay";
+import SessionExpiredPopup from "../components/SessionExpiredPopup";
+import { NavBar } from '../components/NavBar';
+import { useAuth } from "../contexts/AuthContext";
+
+
+
+const Profile = () => {
+ const { user, isLoading, logout } = useAuth();
+ const navigate = useNavigate();
+
+ if (isLoading) {
+ return <LoadingDisplay message="Loading Profile Page..." />;
+ }
+
+ const handleLogout = async () => {
+ try {
+ await logout();
+ navigate("/");
+ } catch (error) {
+ console.error("Logout failed:", error);
+ alert("Network error during logout. Please try again.");
+ }
+ };
+
+ if (!user) {
+ return <SessionExpiredPopup />;
+ }
+
+ return (
+ <div className="min-h-screen bg-slate-950">
+ <NavBar user={user} handleLogout={handleLogout} currentPage="import"/>
+ <h1>Profile</h1>
+ </div>
+ );
+};
+
+export default Profile;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage