Added top bar on all pages. Simplified TTS login component. Fixed some issues. Removed redirects for now.

This commit is contained in:
Tom
2025-04-01 21:12:01 +00:00
parent d44ec50a6a
commit 055885837c
30 changed files with 402 additions and 186 deletions

View File

@ -2,7 +2,7 @@ import { HttpClient } from '@angular/common/http';
import { inject, Injectable } from '@angular/core';
import { environment } from '../../../environments/environment';
import TwitchRedemption from '../models/twitch-redemption';
import { of } from 'rxjs';
import { catchError, EMPTY, Observable, of } from 'rxjs';
import EventService from './EventService';
@Injectable({
@ -31,10 +31,12 @@ export default class TwitchRedemptionService {
'Authorization': 'Bearer ' + localStorage.getItem('jwt'),
}
});
$.subscribe(d => {
this.twitchRedemptions = d;
this.loaded = true;
});
$.pipe(catchError(() => EMPTY))
.subscribe({
next: d => this.twitchRedemptions = d,
error: d => console.log('Twitch API redemptions:', d.error),
complete: () => this.loaded = true,
});
return $;
}
}