Skip to content

Commit 2b44b52

Browse files
committed
cleanup auth
1 parent 2296357 commit 2b44b52

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

web/index/src/App.js

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ function App() {
1313
setContent(<MatchTable auth={auth} serverHost={serverHost} />)
1414
return
1515
}
16-
setContent(<span className="material-icons w3-xxxlarge rotate">autorenew</span>)
16+
// setContent(<span className="material-icons w3-xxxlarge rotate">autorenew</span>)
1717

18-
fetch(serverHost + "/auth/whoami", { credentials: "include" })
19-
.then(response => response.json())
20-
.then(data => {
21-
if (Object.keys(data).length > 0) {
22-
setAuth(data)
23-
} else {
24-
setContent(<span className="w3-xxxlarge rotate">Connect account or upload demo file</span>)
25-
}
26-
})
27-
.catch(err => {
28-
console.log(err)
29-
setContent(<span className="w3-xxxlarge rotate">failed to contact server ...</span>)
30-
})
18+
// fetch(serverHost + "/auth/whoami", { credentials: "include" })
19+
// .then(response => response.json())
20+
// .then(data => {
21+
// if (Object.keys(data).length > 0) {
22+
// setAuth(data)
23+
// } else {
24+
// setContent(<span className="w3-xxxlarge rotate">Connect account or upload demo file</span>)
25+
// }
26+
// })
27+
// .catch(err => {
28+
// console.log(err)
29+
// setContent(<span className="w3-xxxlarge rotate">failed to contact server ...</span>)
30+
// })
3131
}, [serverHost, auth])
3232

3333
// let faceitAuth = (
@@ -36,13 +36,13 @@ function App() {
3636
// 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" />
3737
// </a>
3838
// </div>)
39-
let steamAuth = (
40-
<div className='steamAuth'>
41-
<a href={serverHost + "/auth/steam/login"}>
42-
Connect Steam <img src='https://upload.wikimedia.org/wikipedia/commons/8/83/Steam_icon_logo.svg' height="32" alt="steam-login" />
43-
</a>
44-
</div>
45-
)
39+
// let steamAuth = (
40+
// <div className='steamAuth'>
41+
// <a href={serverHost + "/auth/steam/login"}>
42+
// Connect Steam <img src='https://upload.wikimedia.org/wikipedia/commons/8/83/Steam_icon_logo.svg' height="32" alt="steam-login" />
43+
// </a>
44+
// </div>
45+
// )
4646
if (Object.keys(auth).length > 0) {
4747
// if (auth.faceitNickname) {
4848
// faceitAuth = (
@@ -54,16 +54,16 @@ function App() {
5454
// </div>
5555
// )
5656
// }
57-
if (auth.steamId) {
58-
steamAuth = (
59-
<div className='steamAuth'>
60-
<a href={"https://steamcommunity.com/profiles/" + auth.steamId} target="_blank" rel="noreferrer">
61-
<img src={auth.steamAvatar} height="32" alt="steam-login" /><span id="steamNickname">{auth.steamUsername}</span>
62-
</a>
63-
<a className="material-icons w3-large" href={serverHost + "/auth/steam/logout"}>logout</a>
64-
</div>
65-
)
66-
}
57+
// if (auth.steamId) {
58+
// steamAuth = (
59+
// <div className='steamAuth'>
60+
// <a href={"https://steamcommunity.com/profiles/" + auth.steamId} target="_blank" rel="noreferrer">
61+
// <img src={auth.steamAvatar} height="32" alt="steam-login" /><span id="steamNickname">{auth.steamUsername}</span>
62+
// </a>
63+
// <a className="material-icons w3-large" href={serverHost + "/auth/steam/logout"}>logout</a>
64+
// </div>
65+
// )
66+
// }
6767
}
6868

6969
return (
@@ -84,7 +84,7 @@ function App() {
8484
</div>
8585
<div className="w3-col l4 w3-right-align">
8686
{/* <div className='faceit'>{faceitAuth}</div> */}
87-
<div className='steam'>{steamAuth}</div>
87+
{/* <div className='steam'>{steamAuth}</div> */}
8888
</div>
8989
</div>
9090
</div>

0 commit comments

Comments
 (0)