auto push

This commit is contained in:
kinou-p 2023-06-15 19:03:04 +02:00
parent 551b164342
commit b4562d0f83
2 changed files with 3 additions and 3 deletions

View File

@ -104,7 +104,7 @@ function Chats(){
// console.log(`user= ${tmpUser.data.username}`); // console.log(`user= ${tmpUser.data.username}`);
// console.log(`user= ${tmpUser.data.nickname}`); // console.log(`user= ${tmpUser.data.nickname}`);
// console.log(`user= ${tmpUser.data}`); // 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....`); console.log(`connection....`);
socket.current.emit('connection', {username: tmpUser.data.username}) socket.current.emit('connection', {username: tmpUser.data.username})
// const socket = io("http://localhost:4001", { // const socket = io("http://localhost:4001", {

View File

@ -6,7 +6,7 @@
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */ /* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/06/09 08:18:58 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) => { 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 }); // history(path, { replace: true });
// window.location.replace(path); // window.location.replace(path);
window.history.pushState({}, null, path); window.history.pushState({}, null, path);