Skip to content

Commit

Permalink
update backend
Browse files Browse the repository at this point in the history
  • Loading branch information
palldas committed Jun 4, 2024
1 parent 3c2ed7b commit fca97ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion frontend/src/components/NavbarSignedIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -99,7 +102,7 @@ const NavbarSignedIn = ({ stateVariable, updateState }: Props) => {
>
<Avatar
name={stateVariable.username}
src={`http://localhost:3001/${stateVariable._id}/avatar`}
src={`${vite_backend_url}/${stateVariable._id}/avatar`}
/>
</MenuButton>
<MenuList>
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/components/UserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -94,7 +97,7 @@ const UserProfile: React.FC<UserProfileProps> = ({ userId }) => {
<Avatar
size="2xl"
name={profileData.username}
src={`http://localhost:3001/${userId}/avatar`}
src={`${vite_backend_url}/${userId}/avatar`}
/>
</Flex>
<Heading size="md" mb={4} alignSelf={"center"} textAlign={"center"}>
Expand Down

0 comments on commit fca97ca

Please sign in to comment.