)}
- {user.profile.gender && (
+ {user?.profile?.gender && (
Gender
{user.profile.gender}
)}
- {user.profile.location && (
+ {user?.profile?.location && (
Location
{user.profile.location}
)}
- {user.profile.personalityType && (
+ {user?.profile?.personalityType && (
Personality Type
{user.profile.personalityType}
)}
- {user.profile.conflictStyle && (
+ {user?.profile?.conflictStyle && (
Conflit Style
{user.profile.conflictStyle}
)}
- {user.profile.intellectualInterests && (
+ {user?.profile?.intellectualInterests && (
<
h2 className="text-sm font-medium text-gray-500 uppercase tracking-wider">Interests
@@ -168,7 +168,7 @@ export default function Post() {
)}
- {user.profile.causeAreas && (
+ {user?.profile?.causeAreas && (
<
h2 className="text-sm font-medium text-gray-500 uppercase tracking-wider">Cause Areas
@@ -185,7 +185,7 @@ export default function Post() {
)}
- {user.profile.promptAnswers && (
+ {user?.profile?.promptAnswers && (
<
h2 className="text-sm font-medium text-gray-500 uppercase tracking-wider">Prompt Answers
@@ -202,14 +202,14 @@ export default function Post() {
)}
- {user.profile.description && (
+ {user?.profile?.description && (
About
{user.profile.description}
)}
- {user.profile.contactInfo && (
+ {user?.profile?.contactInfo && (
Contact
{user.profile.contactInfo}
diff --git a/app/profiles/page.tsx b/app/profiles/page.tsx
index bc362901..2261adf7 100644
--- a/app/profiles/page.tsx
+++ b/app/profiles/page.tsx
@@ -50,18 +50,24 @@ export default function ProfilePage() {
Profiles
- {profiles.map((user) => (
+ {profiles.length > 0 ?
+ (profiles.map((user) => (
{user.name}
- {user.profile.description && (
+ {user?.profile?.description && (
{user.profile.description}
)}
- ))}
+ ))) : (
+
+ There are no profiles for this search. Relax the filters or come back later.
+
+ )
+ }
);