[U] login.comp

This commit is contained in:
Jan 2020-10-30 15:11:33 +01:00
parent 7f10bf776e
commit 1a79068215
3 changed files with 4 additions and 2 deletions

View file

@ -63,6 +63,7 @@ export class SupaService {
password
);
this.user.next(res.body.user);
this.supabaseUser = res.body.user;
return res.body.user;
} catch (e) {
console.error('Login', e);
@ -82,6 +83,7 @@ export class SupaService {
password
);
this.user.next(res.body.user);
this.supabaseUser = res.body.user;
return res.body.user;
} catch (e) {
console.error('Signup', e);

View file

@ -16,7 +16,7 @@
<button class="btn btn-primary text-uppercase" type="submit" (click)="login(email.value, password.value)">
Log in
</button> or
<a class="btn btn-secondary text-uppercase" [routerLink]="'/signup'">
<a class="btn btn-secondary text-uppercase" (click)="router.navigate(['/signup'])">
signup
</a>
</div>

View file

@ -10,7 +10,7 @@ import { SupaService } from '../api/supabase/supa.service';
export class LoginComponent implements OnInit {
constructor(
private router: Router,
public router: Router,
private supa: SupaService,
) { }