From cc4b1ce06ae7bd82b7954662307f7805b130cb43 Mon Sep 17 00:00:00 2001 From: Zach Mattes Date: Mon, 3 Jun 2024 18:35:45 -0700 Subject: [PATCH 1/5] fixed items page --- frontend/src/pages/ItemsPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/ItemsPage.tsx b/frontend/src/pages/ItemsPage.tsx index 3355354..60d0da0 100644 --- a/frontend/src/pages/ItemsPage.tsx +++ b/frontend/src/pages/ItemsPage.tsx @@ -46,7 +46,7 @@ const ItemsPage: React.FC = ({ }, [stateVariable.user]); return ( - + {/* Header flex */} Date: Mon, 3 Jun 2024 18:41:42 -0700 Subject: [PATCH 2/5] space --- frontend/src/pages/ItemsPage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/pages/ItemsPage.tsx b/frontend/src/pages/ItemsPage.tsx index 60d0da0..e3c1058 100644 --- a/frontend/src/pages/ItemsPage.tsx +++ b/frontend/src/pages/ItemsPage.tsx @@ -61,6 +61,7 @@ const ItemsPage: React.FC = ({ alignItems="center" flexDir="row" minHeight="8vh" + // > Date: Mon, 3 Jun 2024 18:46:52 -0700 Subject: [PATCH 3/5] token change --- frontend/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index c2ffafb..260a680 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -66,7 +66,7 @@ function App() { - {loggedIn && username != "" ? ( + {token ? ( Date: Mon, 3 Jun 2024 19:23:04 -0700 Subject: [PATCH 4/5] got rid of loggedin --- frontend/src/App.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 260a680..97b3e10 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -54,13 +54,10 @@ function App() { }; useEffect(() => { - getUser().then(() => { - setLoggedIn(!loggedIn); - }); + getUser(); }, [token]); const [user, setUser] = useState(null); - const [loggedIn, setLoggedIn] = useState(false); return ( From fca97cacd1e5421c5f1ea8f5abff73436f18e90e Mon Sep 17 00:00:00 2001 From: Pallavi Das Date: Mon, 3 Jun 2024 20:52:27 -0700 Subject: [PATCH 5/5] update backend --- frontend/src/components/NavbarSignedIn.tsx | 5 ++++- frontend/src/components/UserProfile.tsx | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/NavbarSignedIn.tsx b/frontend/src/components/NavbarSignedIn.tsx index 9c93aaf..1f7ad91 100644 --- a/frontend/src/components/NavbarSignedIn.tsx +++ b/frontend/src/components/NavbarSignedIn.tsx @@ -17,6 +17,9 @@ import logo from "../../public/TheLeaf.png"; import { ReactNode } from "react"; import { useNavigate, Link as ReactLink } from "react-router-dom"; +// const vite_backend_url = import.meta.env.VITE_BACKEND_URL as string; +const vite_backend_url = "https://gather-app-307.azurewebsites.net"; + const NavLink = ({ children, handleClick, @@ -99,7 +102,7 @@ const NavbarSignedIn = ({ stateVariable, updateState }: Props) => { > diff --git a/frontend/src/components/UserProfile.tsx b/frontend/src/components/UserProfile.tsx index 4c6d6fe..67fad72 100644 --- a/frontend/src/components/UserProfile.tsx +++ b/frontend/src/components/UserProfile.tsx @@ -18,6 +18,9 @@ import { CopyIcon } from "@chakra-ui/icons"; import { fetchUserWithString } from "../../lib/fetches"; import { editUser } from "../../lib/edits"; +// const vite_backend_url = import.meta.env.VITE_BACKEND_URL as string; +const vite_backend_url = "https://gather-app-307.azurewebsites.net"; + interface UserProfileProps { userId: string; } @@ -94,7 +97,7 @@ const UserProfile: React.FC = ({ userId }) => {