Skip to content

Commit

Permalink
fixed no experiences notice
Browse files Browse the repository at this point in the history
  • Loading branch information
ktechgau committed Apr 7, 2024
1 parent 4ec9f2e commit b05cf06
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions src/components/ProfilePage/ProfilePageRender.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
import { IoIosCloseCircle } from "react-icons/io";
import useExperiences from "../../hooks/use-experiences.js";


function ProfilePageDetails() {
const { id } = useParams();
const {
Expand Down Expand Up @@ -176,24 +175,21 @@ function ProfilePageDetails() {
</div>

<div className="experience-cards-container">
{experiences.map((experienceData, key) => {
return (
{experiences.length === 0 ? (
<div>
<p>This profile has no experiences to display at the moment</p>
</div>
) : (
experiences.map((experienceData, key) => (
<div className="mb-1">
{experiences.length === 0 ? (
<p>
{" "}
This profile has no experiences to display at the moment
</p>
) : (
<ExperienceCard
key={key}
experienceData={experienceData}
profileOwner={user.id}
/>
)}
<ExperienceCard
key={key}
experienceData={experienceData}
profileOwner={user.id}
/>
</div>
);
})}
))
)}
</div>
</div>

Expand Down Expand Up @@ -305,4 +301,4 @@ function ProfilePageDetails() {
);
}

export default ProfilePageDetails;
export default ProfilePageDetails;

0 comments on commit b05cf06

Please sign in to comment.