Skip to content

Commit

Permalink
Merge conflict resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
YanZhylavy committed Jun 5, 2024
2 parents d29b9f9 + 81e99bf commit 870e47d
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 82 deletions.
160 changes: 81 additions & 79 deletions FrontEnd/src/components/CompanyCard/CompanyCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,96 +49,98 @@ export default function CompanyCard({
};

return (
<div className={styles['company-card']}>
<div className={styles['company-card__block']}>
<div className={styles['company-card__image-frame']}>
{profile.banner_image ? (
<img
src={profile.banner_image}
alt="Company Banner"
className={styles['company-card__image']}
/>
) : (
<img
className={styles['company-card__empty-image']}
src={`${process.env.REACT_APP_PUBLIC_URL}/svg/profile-view-image-empty.svg`}
alt={profile.name}
/>
)}
</div>
<div className={styles['company-card__text-block']}>
<Tooltip
title={activitiesString}
placement="bottom"
pointAtCenter={true}
>
<div className={styles['company-card__category-text']}>
{activitiesSliceString}
</div>
</Tooltip>
<div className={styles['company-card__text-block__header']}>
<div className={styles['company-card__name-text']}>
<Link
className={styles['company-card__name-text_link']}
to={`/profile-detail/${profile.id}`}
>
{profile.name}
</Link>
</div>
<div className={styles['company-card']}>
<Link
className={styles['company-card__link']}
to={`/profile-detail/${profile.id}`}
>
<div className={styles['company-card__block']}>
<div className={styles['company-card__image-frame']}>
{profile.banner_image ? (
<img
src={profile.banner_image}
alt="Company Banner"
className={styles['company-card__image']}
/>
) : (
<img
className={styles['company-card__empty-image']}
src={`${process.env.REACT_APP_PUBLIC_URL}/svg/profile-view-image-empty.svg`}
alt={profile.name}
/>
)}
</div>
<Tooltip
title={profile.regions_ukr_display}
placement="bottom"
pointAtCenter={true}
>
<div className={styles['company-card__region-text']}>
{profile.regions_ukr_display
? profile.regions_ukr_display.length < lengthOfRegion
? `${profile.regions_ukr_display}`
: `${profile.regions_ukr_display.substring(0, 35)}...`
: ''}
<div className={styles['company-card__text-block']}>
<Tooltip
title={activitiesString}
placement="bottom"
pointAtCenter={true}
>
<div className={styles['company-card__category-text']}>
{activitiesSliceString}
</div>
</Tooltip>
<div className={styles['company-card__text-block__header']}>
<div className={styles['company-card__name-text']}>
{profile.name}
</div>
</div>
</Tooltip>
<div className={styles['company-card__footer_content']}>
<Tooltip
title={
profile.categories &&
profile.categories.map((element) => element.name).join(', ')
}
title={profile.regions_ukr_display}
placement="bottom"
pointAtCenter={true}
>
<div className={styles['company-card__badges_block']}>
<CategoryBadges categories={profile.categories.slice(0, 3)} />
<div className={styles['company-card__region-text']}>
{profile.regions_ukr_display
? profile.regions_ukr_display.length < lengthOfRegion
? profile.regions_ukr_display
: `${profile.regions_ukr_display.substring(0, 35)}...`
: ''}
</div>
</Tooltip>
<StarForLike
isSaved={profile.is_saved}
isAuthorized={isAuthorized}
ownProfile={ownProfile}
handleClick={profile.is_saved ? handleDeleteSaved : handleSave}
></StarForLike>
<div className={styles['company-card__footer_content']}>
<Tooltip
title={
profile.categories &&
profile.categories.map((element) => element.name).join(', ')
}
placement="bottom"
pointAtCenter={true}
>
<div className={styles['company-card__badges_block']}>
<CategoryBadges categories={profile.categories.slice(0, 3)} />
</div>
</Tooltip>
</div>
</div>
</div>
<div className={styles['company-card__logo']}>
<div className={styles['company-card__logo-ellipse']}>
{profile.logo_image ? (
<img
src={profile.logo_image}
alt="Logo"
className={styles['company-card__logo-image']}
/>
) : (
<img
className={styles['company-card__logo-image']}
src={`${process.env.REACT_APP_PUBLIC_URL}/companies-logos/default_logo.png`}
alt=""
/>
)}
</div>
</div>
</Link>
<div className={styles['company-card__star']}>
<StarForLike
isSaved={profile.is_saved}
isAuthorized={isAuthorized}
ownProfile={ownProfile}
handleClick={profile.is_saved ? handleDeleteSaved : handleSave}
/>
</div>
</div>
<div className={styles['company-card__logo']}>
<div className={styles['company-card__logo-ellipse']}>
{profile.logo_image ? (
<img
src={profile.logo_image}
alt="Logo"
className={styles['company-card__logo-image']}
/>
) : (
<img
className={styles['company-card__logo-image']}
src={`${process.env.REACT_APP_PUBLIC_URL}/companies-logos/default_logo.png`}
alt=""
/>
)}
</div>
</div>
</div>
);
}

Expand Down
6 changes: 6 additions & 0 deletions FrontEnd/src/components/CompanyCard/CompanyCard.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,9 @@
.company-card__buttons:hover {
cursor: pointer;
}

.company-card__star {
position: absolute;
margin-left: 320px;
margin-top: -35px;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.star {
color: #ffd800;
font-size: 24px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

.data-block__field {
display: flex;
height: 32px;
align-items: center;
min-height: 32px;
align-items: self-start;
gap: 8px;
}

Expand Down

0 comments on commit 870e47d

Please sign in to comment.