mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 10:20:16 +01:00
attempt to use https
This commit is contained in:
2
traque-front/.gitignore
vendored
2
traque-front/.gitignore
vendored
@@ -34,3 +34,5 @@ yarn-error.log*
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
|
||||
certificates
|
||||
@@ -33,7 +33,7 @@ export default function ActionDrawer() {
|
||||
</div>
|
||||
<div className="mt-1 mb-auto">
|
||||
<div className="h-20 flex flex-row">
|
||||
<TextInput inputmode="numeric" placeholder="Enemy code" onClick={(i) => { console.log(i) }} />
|
||||
<TextInput inputMode="numeric" placeholder="Enemy code" onClick={(i) => { console.log(i) }} />
|
||||
<GreenButton onClick={sendCurrentPosition}>Capture target</GreenButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function LoginForm({ onSubmit, title, placeholder, buttonText}) {
|
||||
return (
|
||||
<form className="bg-white shadow-md max-w mx-auto p-5 mx-10 flex flex-col space-y-4" onSubmit={handleSubmit}>
|
||||
<h1 className="text-2xl font-bold text-center text-gray-700">{title}</h1>
|
||||
<TextInput inputmode="numeric" placeholder={placeholder} value={value} onChange={(e) => setValue(e.target.value)} name="team-id"/>
|
||||
<TextInput inputMode="numeric" placeholder={placeholder} value={value} onChange={(e) => setValue(e.target.value)} name="team-id"/>
|
||||
<Button type="submit">{buttonText}</Button>
|
||||
</form>
|
||||
)
|
||||
|
||||
@@ -3,9 +3,11 @@ import { createContext, useContext, useMemo } from "react";
|
||||
|
||||
const { io } = require("socket.io-client");
|
||||
|
||||
const SOCKET_URL = 'http://' + process.env.NEXT_PUBLIC_SOCKET_HOST + ':' + process.env.NEXT_PUBLIC_SOCKET_PORT;
|
||||
const SOCKET_URL = 'wss://' + process.env.NEXT_PUBLIC_SOCKET_HOST + ':' + process.env.NEXT_PUBLIC_SOCKET_PORT;
|
||||
const USER_SOCKET_URL = SOCKET_URL + "/player";
|
||||
const ADMIN_SOCKET_URL = SOCKET_URL + "/admin";
|
||||
console.log(USER_SOCKET_URL);
|
||||
console.log(ADMIN_SOCKET_URL);
|
||||
|
||||
export const teamSocket = io(USER_SOCKET_URL);
|
||||
export const adminSocket = io(ADMIN_SOCKET_URL);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"author": "Quentin Roussel",
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"dev": "next dev --experimental-https",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
|
||||
Reference in New Issue
Block a user