Skip to content

Commit

Permalink
Fix JS redirects to profile
Browse files Browse the repository at this point in the history
Signed-off-by: JamesCullum <JamesCullum@users.noreply.github.com>
  • Loading branch information
JamesCullum committed Mar 26, 2020
1 parent 5a35d8c commit e74095d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion frontend/src/app/navbar/navbar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: MIT
*/

import { environment } from '../../environments/environment'
import { ChallengeService } from '../Services/challenge.service'
import { UserService } from '../Services/user.service'
import { AdministrationService } from '../Services/administration.service'
Expand Down Expand Up @@ -185,7 +186,7 @@ export class NavbarComponent implements OnInit {
}

goToProfilePage () {
window.location.replace('/profile')
window.location.replace(environment.hostServer + '/profile')
}

onToggleSidenav = () => {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/app/sidenav/sidenav.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: MIT
*/

import { environment } from '../../environments/environment'
import { ChallengeService } from '../Services/challenge.service'
import { Component, EventEmitter, NgZone, OnInit, Output } from '@angular/core'
import { SocketIoService } from '../Services/socket-io.service'
Expand Down Expand Up @@ -83,7 +84,7 @@ export class SidenavComponent implements OnInit {
}

goToProfilePage () {
window.location.replace('/profile')
window.location.replace(environment.hostServer + '/profile')
}

// tslint:disable-next-line:no-empty
Expand Down

0 comments on commit e74095d

Please sign in to comment.