WIP:selbst
authorKai Moritz <kai@juplo.de>
Sun, 7 Sep 2025 00:31:03 +0000 (02:31 +0200)
committerKai Moritz <kai@juplo.de>
Sun, 7 Sep 2025 00:31:03 +0000 (02:31 +0200)
src/app/login/login.component.ts
src/app/store/login.actions.ts
src/app/store/login.reducers.ts

index e12313f..016e9ff 100644 (file)
@@ -15,10 +15,10 @@ import { selectToken, selectError, selectIsLoading } from '../store/login.select
   styleUrl: './login.component.less'
 })
 export class LoginComponent {
-  username : string|undefined = undefined;
-  password : string|undefined = undefined;
-  token : string|undefined = undefined;
-  error : string|undefined = undefined;
+  username : string|null = null;
+  password : string|null = null;
+  token : string|null = null;
+  error : string|null = null;
   isLoading : boolean = false;
 
   constructor(private store: Store) {
index 1319408..ba6e195 100644 (file)
@@ -2,7 +2,7 @@ import { createAction, props } from '@ngrx/store';
 
 export const login = createAction(
   '[Login] User Login',
-  props<{ username: string|undefined, password: string|undefined }>()
+  props<{ username: string|null, password: string|null }>()
 );
 
 export const loginSuccess = createAction(
index 762ae8b..a6c146a 100644 (file)
@@ -2,8 +2,8 @@ import { createReducer, on } from '@ngrx/store';
 import { login, loginSuccess, loginFailure } from './login.actions';
 
 export interface State {
-  token: string|undefined;
-  error: string|undefined;
+  token: string|null;
+  error: string|null;
   isLoading: boolean;
 }