Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made the adding cover image feature visible in mobile devices when there is no cover image #4149

Merged
merged 2 commits into from
Dec 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/Components/Facility/FacilityHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export const FacilityHome = (props: any) => {
onDelete={() => window.location.reload()}
facility={facilityData}
/>
{hasCoverImage && (
{hasCoverImage ? (
<div
className={`group relative overflow-clip w-full rounded-t bg-gray-200 h-48 md:h-0 opacity-100 md:opacity-0 transition-all duration-200 ease-in-out ${
hasPermissionToEditCoverImage && "cursor-pointer"
Expand All @@ -303,6 +303,21 @@ export const FacilityHome = (props: any) => {
<CoverImage />
{editCoverImageTooltip}
</div>
) : (
<div
className={`group md:hidden flex w-full self-stretch shrink-0 bg-gray-300 items-center justify-center relative z-0 ${
hasPermissionToEditCoverImage && "cursor-pointer"
}`}
patelaryan7751 marked this conversation as resolved.
Show resolved Hide resolved
onClick={() =>
hasPermissionToEditCoverImage && setEditCoverImage(true)
}
>
<i
className="fas fa-hospital text-4xl block text-gray-500 p-10"
aria-hidden="true"
></i>
{editCoverImageTooltip}
</div>
)}
<div
className={`bg-white ${
Expand Down