From 3f1ac46b0a1cce38505368c9a36b01dd048f87bd Mon Sep 17 00:00:00 2001 From: Tolu Date: Tue, 9 Apr 2024 18:28:28 -0400 Subject: [PATCH] Adjusted names to be able to work on multiple devices --- prem-data/src/components/home-layer-1/pl-table.js | 2 +- prem-data/src/components/recommend-players.js | 2 +- prem-data/src/pages/create.js | 4 ++-- prem-data/src/pages/quiz.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/prem-data/src/components/home-layer-1/pl-table.js b/prem-data/src/components/home-layer-1/pl-table.js index 0fc840b..bfbaa7e 100644 --- a/prem-data/src/components/home-layer-1/pl-table.js +++ b/prem-data/src/components/home-layer-1/pl-table.js @@ -20,7 +20,7 @@ export default function BasicTabs() { const fetchData = async () => { try{ - const response = await fetch(`http://localhost:3001/seasonInformation`); + const response = await fetch(`https://pl-database-1gr2.onrender.com/seasonInformation`); const data = await response.json(); setData(data); } diff --git a/prem-data/src/components/recommend-players.js b/prem-data/src/components/recommend-players.js index 654186f..6df42ac 100644 --- a/prem-data/src/components/recommend-players.js +++ b/prem-data/src/components/recommend-players.js @@ -9,7 +9,7 @@ export const RecommendPlayers = ({title}) => { const fetchData = async () => { try{ - const response = await fetch(`http://localhost:3001/explore-players`); + const response = await fetch(`https://pl-database-1gr2.onrender.com/explore-players`); const data = await response.json(); setRandomPlayers(data); } diff --git a/prem-data/src/pages/create.js b/prem-data/src/pages/create.js index 61d4d94..88995e0 100644 --- a/prem-data/src/pages/create.js +++ b/prem-data/src/pages/create.js @@ -59,8 +59,8 @@ function Create(){ option2 = normalizeNames[option2] try{ - const response1 = await fetch(`http://localhost:3001/create/${option1}`); - const response2 = await fetch(`http://localhost:3001/create/${option2}`); + const response1 = await fetch(`https://pl-database-1gr2.onrender.com/create/${option1}`); + const response2 = await fetch(`https://pl-database-1gr2.onrender.com/${option2}`); const data1 = await response1.json(); const data2 = await response2.json(); diff --git a/prem-data/src/pages/quiz.js b/prem-data/src/pages/quiz.js index 3012bd3..2d8a4fb 100644 --- a/prem-data/src/pages/quiz.js +++ b/prem-data/src/pages/quiz.js @@ -24,7 +24,7 @@ function Quiz(){ const fetchData = async () => { try{ - const response = await fetch(`http://localhost:3001/connections`); + const response = await fetch(`https://pl-database-1gr2.onrender.com/connections`); const data = await response.json(); setConnectionsQuestion(data[0]);