From b4562d0f83b12b46759e6152086d550f96ebf6b0 Mon Sep 17 00:00:00 2001 From: kinou-p Date: Thu, 15 Jun 2023 19:03:04 +0200 Subject: [PATCH] auto push --- containers/react/src/components/Messages/Chats.jsx | 2 +- containers/react/src/components/Social/Friend.jsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/containers/react/src/components/Messages/Chats.jsx b/containers/react/src/components/Messages/Chats.jsx index 87b29cbf..fdd812e5 100644 --- a/containers/react/src/components/Messages/Chats.jsx +++ b/containers/react/src/components/Messages/Chats.jsx @@ -104,7 +104,7 @@ function Chats(){ // console.log(`user= ${tmpUser.data.username}`); // console.log(`user= ${tmpUser.data.nickname}`); // console.log(`user= ${tmpUser.data}`); - socket.current = io("ws://localhost:4001"); + socket.current = io("ws://" + process.env.REACT_APP_BASE_URL + ":4001"); console.log(`connection....`); socket.current.emit('connection', {username: tmpUser.data.username}) // const socket = io("http://localhost:4001", { diff --git a/containers/react/src/components/Social/Friend.jsx b/containers/react/src/components/Social/Friend.jsx index 8630f8c1..c68146c4 100644 --- a/containers/react/src/components/Social/Friend.jsx +++ b/containers/react/src/components/Social/Friend.jsx @@ -6,7 +6,7 @@ /* By: apommier +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/06/09 08:18:58 by apommier #+# #+# */ -/* Updated: 2023/06/09 08:35:21 by apommier ### ########.fr */ +/* Updated: 2023/06/15 19:03:01 by apommier ### ########.fr */ /* */ /* ************************************************************************** */ @@ -79,7 +79,7 @@ export default function Friend({currentUser}) }; const handleButtonClick = (user) => { - let path = `http://localhost/profile/${user.username}`; + let path = `http://` process.env.REACT_APP_BASE_URL `/profile/${user.username}`; // history(path, { replace: true }); // window.location.replace(path); window.history.pushState({}, null, path);