Skip to content

Commit

Permalink
fix(human-app/frontend/logo-icon): handle logo icon click on mobile d…
Browse files Browse the repository at this point in the history
…rawers
  • Loading branch information
KacperKoza343 committed Oct 25, 2024
1 parent 846223a commit 9726053
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function DrawerNavigation({
{!isMobile && (
<Stack
alignItems="flex-start"
sx={{ paddingLeft: '26px', cursor: 'pointer' }}
sx={{ paddingLeft: '60px', cursor: 'pointer' }}
onClick={handleMainNavIconClick}
>
<HumanLogoNavbarIcon />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ export function Navbar({
<Grid
sx={{ cursor: 'pointer', paddingLeft: '8px' }}
onClick={() => {
if (isMobile) {
setOpen(false);
}
handleMainNavIconClick();
}}
role="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ import { AvailableJobsNetworkFilterMobile } from '@/pages/worker/jobs/components
import { AvailableJobsStatusFilterMobile } from '@/pages/worker/jobs/components/available-jobs/mobile/available-jobs-status-filter-mobile';
import { AvailableJobsJobTypeFilterMobile } from '@/pages/worker/jobs/components/available-jobs/mobile/available-jobs-job-type-filter-mobile';
import { useColorMode } from '@/hooks/use-color-mode';
import { useHandleMainNavIconClick } from '@/hooks/use-handle-main-nav-icon-click';

interface DrawerMobileProps {
setIsMobileFilterDrawerOpen: Dispatch<SetStateAction<boolean>>;
}
export function AvailableJobsDrawerMobile({
setIsMobileFilterDrawerOpen,
}: DrawerMobileProps) {
const handleMainNavIconClick = useHandleMainNavIconClick();
const { colorPalette } = useColorMode();
const { t } = useTranslation();
const { setFilterParams, filterParams } = useJobsFilterStore();
Expand Down Expand Up @@ -58,7 +60,15 @@ export function AvailableJobsDrawerMobile({
zIndex: '999999',
}}
>
<HumanLogoIcon />
<Stack
sx={{ cursor: 'pointer' }}
onClick={() => {
handleMainNavIconClick();
// setIsMobileFilterDrawerOpen(false);
}}
>
<HumanLogoIcon />
</Stack>

<IconButton
onClick={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Button } from '@/components/ui/button';
import { HumanLogoIcon, SortArrow } from '@/components/ui/icons';
import { useMyJobsFilterStore } from '@/hooks/use-my-jobs-filter-store';
import { useColorMode } from '@/hooks/use-color-mode';
import { useHandleMainNavIconClick } from '@/hooks/use-handle-main-nav-icon-click';
import { MyJobsNetworkFilterMobile } from './my-jobs-network-filter-mobile';
import { MyJobsJobTypeFilterMobile } from './my-jobs-job-type-filter-mobile';
import { MyJobsStatusFilterMobile } from './my-jobs-status-filter-mobile';
Expand All @@ -20,6 +21,7 @@ interface DrawerMobileProps {
export function MyJobsDrawerMobile({
setIsMobileFilterDrawerOpen,
}: DrawerMobileProps) {
const handleMainNavIconClick = useHandleMainNavIconClick();
const { colorPalette } = useColorMode();
const { t } = useTranslation();
const { setFilterParams, filterParams } = useMyJobsFilterStore();
Expand Down Expand Up @@ -58,7 +60,15 @@ export function MyJobsDrawerMobile({
zIndex: '999999',
}}
>
<HumanLogoIcon />
<Stack
sx={{ cursor: 'pointer' }}
onClick={() => {
handleMainNavIconClick();
// setIsMobileFilterDrawerOpen(false);
}}
>
<HumanLogoIcon />
</Stack>

<IconButton
onClick={() => {
Expand Down

0 comments on commit 9726053

Please sign in to comment.