diff --git a/frontend/jest.config.cjs b/frontend/jest.config.cjs index 94f9284c..a018c6e0 100644 --- a/frontend/jest.config.cjs +++ b/frontend/jest.config.cjs @@ -26,11 +26,7 @@ module.exports = { options: { metaObjectReplacement: { url: 'https://www.url.com', - env: { - VITE_BACKEND_URL: 'http://localhost:8000/', - VITE_FRONTEND_URL: 'http://localhost:80', - VITE_CONTAINER_ORIGIN: 'http://localhost:8080/', - }, + env: {}, }, }, }, diff --git a/frontend/src/components/HomePage.tsx b/frontend/src/components/HomePage.tsx index 01fd0fe7..24eeb8a2 100644 --- a/frontend/src/components/HomePage.tsx +++ b/frontend/src/components/HomePage.tsx @@ -5,7 +5,7 @@ import { Footer } from './HomeComponents/Footer/Footer'; import { SetupGuide } from './HomeComponents/SetupGuide/SetupGuide'; import { FAQ } from './HomeComponents/FAQ/FAQ'; import { Tasks } from './HomeComponents/Tasks/Tasks'; -import { url } from '@/components/utils/URLs'; +import { url, getWebSocketURL } from '@/components/utils/URLs'; import { useNavigate } from 'react-router'; import { motion } from 'framer-motion'; import { toast } from 'react-toastify'; @@ -60,9 +60,7 @@ export const HomePage: React.FC = () => { getTasks(userInfo.email, userInfo.encryption_secret, userInfo.uuid); } - const socketURL = `${url.backendURL.replace(/^http/, 'ws')}ws?clientID=${ - userInfo.uuid - }`; + const socketURL = getWebSocketURL(`ws?clientID=${userInfo.uuid}`); const socket = new WebSocket(socketURL); // socket.onopen = () => console.log('WebSocket connected!'); diff --git a/frontend/src/components/LandingComponents/Hero/__tests__/__snapshots__/Hero.test.tsx.snap b/frontend/src/components/LandingComponents/Hero/__tests__/__snapshots__/Hero.test.tsx.snap index 6d325033..3c459e6d 100644 --- a/frontend/src/components/LandingComponents/Hero/__tests__/__snapshots__/Hero.test.tsx.snap +++ b/frontend/src/components/LandingComponents/Hero/__tests__/__snapshots__/Hero.test.tsx.snap @@ -42,7 +42,7 @@ exports[`Hero component using snapshot renders correctly 1`] = ` class="space-y-4 md:space-y-0 md:space-x-4" >