ludo web based game config file changes
This commit is contained in:
+1
-3
@@ -13,7 +13,7 @@ function App() {
|
||||
const [playerSocket, setPlayerSocket] = useState();
|
||||
const [redirect, setRedirect] = useState();
|
||||
useEffect(() => {
|
||||
const socket = io(`http://${window.location.hostname}:8080`, { withCredentials: true });
|
||||
const socket = io(`${window.location.protocol}//${window.location.host}`, { withCredentials: true });
|
||||
socket.on('player:data', data => {
|
||||
data = JSON.parse(data);
|
||||
setPlayerData(data);
|
||||
@@ -72,5 +72,3 @@ function App() {
|
||||
</SocketContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
||||
Reference in New Issue
Block a user