mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 12:25:05 +03:00
This PR runs `prettier` on the `examples` folder. Depends on https://github.com/supabase/supabase/pull/43849.
24 lines
553 B
TypeScript
24 lines
553 B
TypeScript
import { Component } from '@angular/core'
|
|
import { Router } from '@angular/router'
|
|
import { SupabaseService } from './supabase.service'
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
standalone: false,
|
|
templateUrl: 'app.component.html',
|
|
styleUrls: ['app.component.scss'],
|
|
})
|
|
export class AppComponent {
|
|
constructor(
|
|
private supabase: SupabaseService,
|
|
private router: Router
|
|
) {
|
|
this.supabase.authChanges((_, session) => {
|
|
console.log(session)
|
|
if (session?.user) {
|
|
this.router.navigate(['/account'])
|
|
}
|
|
})
|
|
}
|
|
}
|