Fixed Flask fetching issue

This commit is contained in:
2025-01-23 13:02:04 +00:00
parent 1047b96c0f
commit 233e2df781
2 changed files with 3 additions and 4 deletions

View File

@@ -9,7 +9,7 @@
"lint": "eslint .",
"preview": "vite preview"
},
"proxy": "http://127.0.0.1:8080",
"proxy": "http://web_server:5000",
"dependencies": {
"@stripe/react-stripe-js": "^3.1.1",
"@stripe/stripe-js": "^5.5.0",

View File

@@ -3,7 +3,6 @@ import Navbar from "../components/Layout/Navbar";
import ListRow from "../components/Layout/ListRow";
// import { data, Link } from "react-router-dom";
const API_URL = import.meta.env.VITE_API_URL;
const handleStreamClick = (streamId: string) => {
// Handle navigation to stream page
@@ -24,13 +23,13 @@ const HomePage: React.FC = () => {
// ↓↓ runs twice when in development mode
useEffect(() => {
fetch(`${API_URL}/get_loggedin_status`)
fetch("/api/get_loggedin_status")
.then((response) => response.json())
.then((data) => {
setLoggedInStatus(data);
console.log(data);
});
fetch(`${API_URL}/get_streams`)
fetch("/api/get_streams")
.then((response) => response.json())
.then((data: StreamItem[]) => {
setFeaturedStreams(data);