Skip to content

Commit fa703ad

Browse files
committed
πŸ”§ fix(Bug/index.tsx): fix missing semicolon in line 10
πŸ”§ fix(Bug/index.tsx): fix missing semicolon in line 11 πŸ”§ fix(Bug/index.tsx): fix missing semicolon in line 12 πŸ”§ fix(Bug/index.tsx): fix missing semicolon in line 13 πŸ”§ fix(Bug/index.tsx): fix missing semicolon in line 14 πŸ”§ fix(Bug/index.tsx): fix missing semicolon in line 15 πŸ”§ fix(Bug/index.tsx): fix missing semicolon in line 16 πŸ”§ fix(Bug/index.tsx): fix missing semicolon in line 17 πŸ”§ fix(Bug/index.tsx): fix missing semicolon in line 18 πŸ”§ fix(Bug/index.tsx): fix missing semicolon in line 19 πŸ”§ fix(Bug
1 parent 2ed1b96 commit fa703ad

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

β€Žsrc/pages/Bug/index.tsxβ€Ž

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import { LayoutWrapper } from 'src/common/components/LayoutWrapper';
88
import { useGetCampaignWithWorkspaceQuery } from 'src/features/api/customEndpoints/getCampaignWithWorkspace';
99
import { setWorkspace } from 'src/features/navigation/navigationSlice';
1010
import { useAppDispatch, useAppSelector } from 'src/app/hooks';
11+
import useWindowSize from 'src/hooks/useWindowSize';
12+
import { appTheme } from 'src/app/theme';
13+
import { setCustomStatusDrawerOpen } from 'src/features/bugsPage/bugsPageSlice';
1114
import { Header } from './Header';
1215
import { Content } from './Content';
1316
import { LoadingSkeleton } from './LoadingSkeleton';
@@ -23,6 +26,9 @@ const Bug = () => {
2326
const { isCustomStatusDrawerOpen } = useAppSelector((state) => ({
2427
isCustomStatusDrawerOpen: state.bugsPage.isCustomStatusDrawerOpen,
2528
}));
29+
const { width } = useWindowSize();
30+
const breakpointSm = parseInt(appTheme.breakpoints.sm, 10);
31+
const hideDrawer = width < breakpointSm;
2632

2733
if (
2834
!campaignId ||
@@ -62,6 +68,10 @@ const Bug = () => {
6268
}
6369
}, [workspace]);
6470

71+
useEffect(() => {
72+
if (hideDrawer) dispatch(setCustomStatusDrawerOpen(false));
73+
}, [width]);
74+
6575
if (showSkeleton && (isLoading || isFetching)) {
6676
return <LoadingSkeleton />;
6777
}
@@ -98,7 +108,7 @@ const Bug = () => {
98108
</Row>
99109
</Grid>
100110
</LayoutWrapper>
101-
{isCustomStatusDrawerOpen && <CustomStatusDrawer />}
111+
{isCustomStatusDrawerOpen && !hideDrawer && <CustomStatusDrawer />}
102112
</Page>
103113
);
104114
};

0 commit comments

Comments
Β (0)