File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
common/components/twitch-login Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,7 @@ export class TwitchLoginComponent {
20
20
@Input ( ) redirectUrl : string | null = null ;
21
21
22
22
twitchLogin ( ) : void {
23
- let redirectUrl = null ;
24
- if ( ! this . redirectUrl ) {
25
- redirectUrl = `${ environment . apiUrl } /user/twitch-login` ;
26
- } else {
27
- redirectUrl = `${ environment . apiUrl } /${ this . redirectUrl } ` ;
28
- }
29
-
23
+ const redirectUrl = `${ environment . apiUrl } /${ this . redirectUrl } ` ;
30
24
window . location . href = `https://id.twitch.tv/oauth2/authorize?` +
31
25
encodeURI ( `client_id=${ environment . twitchClientId } &` +
32
26
`redirect_uri=${ redirectUrl } &` +
Original file line number Diff line number Diff line change 16
16
data-shape ="rectangular "
17
17
data-logo_alignment ="left ">
18
18
</ div >
19
- < app-twitch-login [twitchScopeIndex] ="0 " />
19
+ < app-twitch-login [twitchScopeIndex] ="0 " redirectUrl =" user/twitch-login " />
20
20
</ div >
21
21
< div class ="centered-box_content-container " [hidden] ="!checkingLogin ">
22
22
< app-loading-icon fontSize ="24px " height ="35px " width ="35px ">
You can’t perform that action at this time.
0 commit comments