init commit,
This commit is contained in:
6
03_source/mobile_notworking.del/src/util/IsLoggedIn.tsx
Normal file
6
03_source/mobile_notworking.del/src/util/IsLoggedIn.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
// if not logged in, checked by profile is null or undefined
|
||||
|
||||
export default function IsLoggedIn(profile) {
|
||||
if (!profile) return false;
|
||||
return true;
|
||||
}
|
11
03_source/mobile_notworking.del/src/util/types.ts
Normal file
11
03_source/mobile_notworking.del/src/util/types.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export interface DispatchObject {
|
||||
[key: string]: any;
|
||||
type: string;
|
||||
}
|
||||
|
||||
type PromiseResolveValue<T> = T extends Promise<infer R> ? R : T;
|
||||
type EffectType<T extends (...args: any) => any> = ReturnType<ReturnType<T>>;
|
||||
type EffectReturnValue<T extends (...args: any) => any> = PromiseResolveValue<EffectType<T>>;
|
||||
export type ActionType<T extends (...args: any) => any> = ReturnType<T> extends DispatchObject
|
||||
? ReturnType<T>
|
||||
: EffectReturnValue<T>;
|
Reference in New Issue
Block a user