From 119f5f1b5acb370e835e2166456d2a6043ca5a6e Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Tue, 20 Aug 2024 20:31:02 +0300 Subject: fix: revert to static homepage (#195) Co-authored-by: Wolfboy248 <121288977+Wolfboy248@users.noreply.github.com> --- frontend/src/components/pages/home.js | 88 +++++++++++++++++------------------ 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/frontend/src/components/pages/home.js b/frontend/src/components/pages/home.js index c2376f2..0a46bec 100644 --- a/frontend/src/components/pages/home.js +++ b/frontend/src/components/pages/home.js @@ -7,67 +7,67 @@ import Record from '../record'; export default function Homepage({ token }) { const [profile, setProfile] = useState(null); - useEffect(() => { +// useEffect(() => { - if (!token) { - return; - } +// if (!token) { +// return; +// } - async function home() { +// async function home() { - const profileResponse = await fetch(`https://lp.ardapektezol.com/api/v1/profile`, { - headers: { - Authorization: token - } - }) +// const profileResponse = await fetch(`https://lp.ardapektezol.com/api/v1/profile`, { +// headers: { +// Authorization: token +// } +// }) - const profileData = await profileResponse.json(); +// const profileData = await profileResponse.json(); - setProfile(profileData); +// setProfile(profileData); - const gamesResponse = await fetch("https://lp.ardapektezol.com/api/v1/games", { - headers: { - Authorization: token - } - }); +// const gamesResponse = await fetch("https://lp.ardapektezol.com/api/v1/games", { +// headers: { +// Authorization: token +// } +// }); - const gamesData = await gamesResponse.json(); +// const gamesData = await gamesResponse.json(); - const recommendedMapImg = document.querySelector("#recommendedMapImg"); +// const recommendedMapImg = document.querySelector("#recommendedMapImg"); - recommendedMapImg.style.backgroundImage = `url(${gamesData.data[0].image})` +// recommendedMapImg.style.backgroundImage = `url(${gamesData.data[0].image})` - const column1 = document.querySelector("#column1"); - const column2 = document.querySelector("#column2"); +// const column1 = document.querySelector("#column1"); +// const column2 = document.querySelector("#column2"); - column2.style.height = column1.clientHeight + "px"; +// column2.style.height = column1.clientHeight + "px"; - const panels = document.querySelectorAll(".homepage-panel"); - panels.forEach(e => { - // this is cuz react is silly - if (e.innerHTML.includes('