24 lines
569 B
TypeScript
24 lines
569 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { SupabaseAuthUser } from '@supabase/supabase-js';
|
|
import { SupaService } from '../api/supabase/supa.service';
|
|
|
|
@Component({
|
|
selector: 'app-profile',
|
|
templateUrl: './profile.component.html',
|
|
styleUrls: ['./profile.component.scss']
|
|
})
|
|
export class ProfileComponent implements OnInit {
|
|
user: SupabaseAuthUser;
|
|
|
|
constructor(
|
|
public supa: SupaService,
|
|
) { }
|
|
|
|
ngOnInit(): void {
|
|
this.supa.client.auth.user().then(user => {
|
|
console.log('user', user)
|
|
this.user = user;
|
|
});
|
|
}
|
|
|
|
}
|