@@ -11,76 +11,6 @@ export function Home() {
11
11
12
12
const [ isWasmLoaded , setIsWasmLoaded ] = useState ( false ) ;
13
13
14
- useEffect ( ( ) => {
15
- // if (Object.keys(auth).length > 0) {
16
- // setContent(<MatchTable auth={auth} serverHost={serverHost} />)
17
- // return
18
- // }
19
-
20
- // async function loadWasm() {
21
- // const go = new window.Go();
22
- // WebAssembly.instantiateStreaming(fetch(serverHost + "/wasm"), go.importObject)
23
- // .then((result) => {
24
- // go.run(result.instance);
25
- // setIsWasmLoaded(true);
26
- // });
27
- // }
28
- // if (!isWasmLoaded) {
29
- // loadWasm();
30
- // }
31
-
32
- // setContent(<span className="material-icons w3-xxxlarge rotate">autorenew</span>)
33
-
34
- // fetch(serverHost + "/auth/whoami", { credentials: "include" })
35
- // .then(response => response.json())
36
- // .then(data => {
37
- // if (Object.keys(data).length > 0) {
38
- // setAuth(data)
39
- // } else {
40
- // setContent(<span className="w3-xxxlarge rotate">Connect account or upload demo file</span>)
41
- // }
42
- // })
43
- // .catch(err => {
44
- // console.log(err)
45
- // setContent(<span className="w3-xxxlarge rotate">failed to contact server ...</span>)
46
- // })
47
- } , [ serverHost , auth ] )
48
-
49
- // let faceitAuth = (
50
- // <div className='faceitAuth'>
51
- // <a href={serverHost + "/auth/faceit/login"}>
52
- // Connect FACEIT <img src="https://upload.wikimedia.org/wikipedia/commons/5/52/Cib-faceit_%28CoreUI_Icons_v1.0.0%29.svg" height="32" alt="faceit-logo" />
53
- // </a>
54
- // </div>)
55
- // let steamAuth = (
56
- // <div className='steamAuth'>
57
- // <a href={serverHost + "/auth/steam/login"}>
58
- // Connect Steam <img src='https://upload.wikimedia.org/wikipedia/commons/8/83/Steam_icon_logo.svg' height="32" alt="steam-login" />
59
- // </a>
60
- // </div>
61
- // )
62
- if ( Object . keys ( auth ) . length > 0 ) {
63
- // if (auth.faceitNickname) {
64
- // faceitAuth = (
65
- // <div className='faceitAuth'>
66
- // <a href={"https://www.faceit.com/en/players/" + auth.faceitNickname} target="_blank" rel="noreferrer">
67
- // <img src="/assets/faceit-logo.svg" alt="faceit-logo" height="32" /><span id="faceitNickname">{auth.faceitNickname}</span>
68
- // </a>
69
- // <a className="material-icons w3-large" href={serverHost + "/auth/faceit/logout"}>logout</a>
70
- // </div>
71
- // )
72
- // }
73
- // if (auth.steamId) {
74
- // steamAuth = (
75
- // <div className='steamAuth'>
76
- // <a href={"https://steamcommunity.com/profiles/" + auth.steamId} target="_blank" rel="noreferrer">
77
- // <img src={auth.steamAvatar} height="32" alt="steam-login" /><span id="steamNickname">{auth.steamUsername}</span>
78
- // </a>
79
- // <a className="material-icons w3-large" href={serverHost + "/auth/steam/logout"}>logout</a>
80
- // </div>
81
- // )
82
- // }
83
- }
84
14
85
15
return (
86
16
< div className = "App" >
0 commit comments