Skip to content

Commit

Permalink
Merge pull request #922 from NSUWAL123/fix-project-detail-mobile-footer
Browse files Browse the repository at this point in the history
fix (projectDetails): dynamic grid-col removed due to issues, footerI…
  • Loading branch information
varun2948 authored Oct 18, 2023
2 parents 9eb313f + 9d141c0 commit eff5a11
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions src/frontend/src/components/ProjectDetails/MobileFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,36 +65,38 @@ const MobileFooter = () => {
),
},
];
const FooterItemList = ({ item }) => {
return (
<div
onClick={() => dispatch(ProjectActions.SetMobileFooterSelection(item?.id))}
className="fmtm-group fmtm-cursor-pointer"
>
<div
className={`fmtm-w-full fmtm-flex fmtm-justify-center fmtm-py-1 fmtm-rounded-3xl fmtm-mb-1 fmtm-duration-300 ${
mobileFooterSelection === item?.id ? 'fmtm-bg-red-100' : 'group-hover:fmtm-bg-gray-200'
}`}
>
<div>{item?.icon}</div>
</div>
<div className="fmtm-flex fmtm-justify-center">
<p
className={`${
mobileFooterSelection === item?.id ? 'fmtm-text-primaryRed' : 'fmtm-text-gray-500'
} fmtm-duration-300 fmtm-text-xs fmtm-whitespace-nowrap`}
>
{item?.title}
</p>
</div>
</div>
);
};
return (
<div className="fmtm-absolute fmtm-bottom-0 sm:fmtm-hidden fmtm-w-full fmtm-border-t-[1px]">
<div
className={`fmtm-w-full fmtm-grid fmtm-grid-cols-${
footerItem.length - 1
} fmtm-bg-white fmtm-pb-16 fmtm-pt-2 fmtm-gap-5 fmtm-px-2`}
className={`fmtm-w-full fmtm-grid fmtm-grid-cols-5 fmtm-bg-white fmtm-pb-16 fmtm-pt-2 fmtm-gap-5 fmtm-px-2`}
>
{footerItem.map((item) => (
<div
key={item?.id}
onClick={() => dispatch(ProjectActions.SetMobileFooterSelection(item?.id))}
className="fmtm-group fmtm-cursor-pointer"
>
<div
className={`fmtm-w-full fmtm-flex fmtm-justify-center fmtm-py-1 fmtm-rounded-3xl fmtm-mb-1 fmtm-duration-300 ${
mobileFooterSelection === item?.id ? 'fmtm-bg-red-100' : 'group-hover:fmtm-bg-gray-200'
}`}
>
<div>{item?.icon}</div>
</div>
<div className="fmtm-flex fmtm-justify-center">
<p
className={`${
mobileFooterSelection === item?.id ? 'fmtm-text-primaryRed' : 'fmtm-text-gray-500'
} fmtm-duration-300 fmtm-text-xs fmtm-whitespace-nowrap`}
>
{item?.title}
</p>
</div>
</div>
<FooterItemList key={item?.id} item={item} />
))}
</div>
</div>
Expand Down

0 comments on commit eff5a11

Please sign in to comment.