Prettier format pending files
This commit is contained in:
parent
d710a8f759
commit
223f06fcf5
1 changed files with 10 additions and 4 deletions
|
|
@ -22,10 +22,16 @@ export interface AethexUserProfile extends UserProfile {
|
||||||
|
|
||||||
export function checkProfileComplete(p?: AethexUserProfile | null): boolean {
|
export function checkProfileComplete(p?: AethexUserProfile | null): boolean {
|
||||||
if (!p) return false;
|
if (!p) return false;
|
||||||
const hasUsername = typeof p.username === "string" && p.username.trim().length > 0;
|
const hasUsername =
|
||||||
const hasFullName = typeof p.full_name === "string" && p.full_name.trim().length > 0;
|
typeof p.username === "string" && p.username.trim().length > 0;
|
||||||
const hasUserType = typeof (p as any).user_type === "string" && (p as any).user_type.trim().length > 0;
|
const hasFullName =
|
||||||
const hasExperience = typeof (p as any).experience_level === "string" && (p as any).experience_level.trim().length > 0;
|
typeof p.full_name === "string" && p.full_name.trim().length > 0;
|
||||||
|
const hasUserType =
|
||||||
|
typeof (p as any).user_type === "string" &&
|
||||||
|
(p as any).user_type.trim().length > 0;
|
||||||
|
const hasExperience =
|
||||||
|
typeof (p as any).experience_level === "string" &&
|
||||||
|
(p as any).experience_level.trim().length > 0;
|
||||||
return hasUsername && hasFullName && hasUserType && hasExperience;
|
return hasUsername && hasFullName && hasUserType && hasExperience;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue