diff --git a/src/app/new-match/new-match-client.tsx b/src/app/new-match/new-match-client.tsx index 01eaf22..1b5d835 100644 --- a/src/app/new-match/new-match-client.tsx +++ b/src/app/new-match/new-match-client.tsx @@ -520,60 +520,75 @@ export default function NewMatchClient() { return ( <> -
- +
+
+ +
-
+
{/* Header Section Skeleton */} -
+
- +
- {/* Match Card Skeleton */} -
- {/* Name line */} - - - {/* Subtitle / Details lines */} -
- - - -
- - {/* Button skeleton */} - -
+
+ {/* Match Card Skeleton */} +
+ {/* Name line */} + - {/* Advisor Card Skeleton */} -
-
- -
- - + {/* Subtitle / Details lines */} +
+ +
-
-
- - - - + {/* Button skeleton */} + +
+ + {/* Advisor Card Skeleton */} +
+
+ +
+ +
- +
+
+ + + + +
+ + +
-
-
+ +
); } + + const pairedPersonalFields = [ + matchDisplay.age, + matchDisplay.residence, + ].filter((field): field is DisplayField => Boolean(field)); + const pairedEduFields = [ matchDisplay.educationLevel, matchDisplay.fieldOfStudy, @@ -602,11 +617,19 @@ export default function NewMatchClient() { <> -
- +
+
+ +
-
-
+
+
-

+

{matchHeadingTitle} -

-

+ +

{matchHeadingDescription}

- {isLoading ? ( -
-
- {/* Name line */} - +
+ {isLoading ? ( +
+
+ {/* Name line */} + + + {/* Subtitle / Details lines */} +
+ + +
- {/* Subtitle / Details lines */} -
- - - + {/* Button skeleton */} +
- - {/* Button skeleton */} - -
-
- ) : ( -
- {isError ? ( -

- Unable to load match summary. -

- ) : matchSummary ? ( - <> -

- {matchDisplay.name} -

- -
- {matchDisplay.age ? ( - - ) : null} - - {matchDisplay.residence ? ( - - ) : null} - - {pairedEduFields.length ? ( -

- {pairedEduFields.map((field, index) => ( - - {index > 0 ? ( - | - ) : null} - - {field.label}:{" "} +

+ ) : ( +
+ {isError ? ( +

+ Unable to load match summary. +

+ ) : matchSummary ? ( + <> +

+ {matchDisplay.name} +

+ +
+ {pairedPersonalFields.length ? ( +

+ {pairedPersonalFields.map((field, index) => ( + + {index > 0 ? ( + | + ) : null} + + {field.label}:{" "} + + {field.value} - {field.value} - - ))} -

- ) : null} - - {matchDisplay.job ? ( - - ) : null} - - {matchDisplay.hobbies ? ( - - ) : null} - - {matchDisplay.maritalStatus ? ( - - ) : null} - {matchDisplay.cityPreference ? ( - - ) : null} -
+ ))} +

+ ) : null} + + {pairedEduFields.length ? ( +

+ {pairedEduFields.map((field, index) => ( + + {index > 0 ? ( + | + ) : null} + + {field.label}:{" "} + + {field.value} + + ))} +

+ ) : null} + + {matchDisplay.job ? ( + + ) : null} + + {matchDisplay.hobbies ? ( + + ) : null} + + {matchDisplay.maritalStatus ? ( + + ) : null} + {matchDisplay.cityPreference ? ( + + ) : null} +
- - - ) : ( -

- No match summary is available yet. -

- )} -
- )} - - + + + ) : ( +

+ No match summary is available yet. +

+ )} +
+ )} +
+ +
+