Skip to content

Commit 27d80f8

Browse files
author
Aleksander Brylski
committed
feat(app-board): add mobile for triggering review dialog
1 parent 202b576 commit 27d80f8

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

packages/game-app/src/gameView/components/TriggerReviewDialog/TriggerReviewDialog.styled.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,18 @@ export const TriggerDialogContainer = styled(Dialog.DialogContainer)<{ showRevie
1717
left: 278px;
1818
bottom: 70px;
1919
transform: unset;
20+
@media (max-width: ${({ theme }) => theme.mobile}) {
21+
left: 0;
22+
}
2023
:after {
2124
{
2225
content: '';
2326
position: absolute;
2427
bottom: -14px;
2528
left: 350px;
29+
@media (max-width: ${({ theme }) => theme.mobile}) {
30+
left: 170px;
31+
}
2632
border-style: solid;
2733
border-width: 14px 14px 0;
2834
border-color: rgba(255, 255, 255, 0.6) transparent;

packages/game-app/src/gameView/components/TriggerReviewDialog/TriggerReviewDialog.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { TriggerDialogContainer } from './TriggerReviewDialog.styled';
55
import { useDispatch } from 'react-redux';
66
import { actions } from '../../slice';
77
import ReviewPanel from '../ReviewPanel';
8+
import { useWindowDimensions } from '../../../_shared/components/utils';
89

910
type Props = {
1011
isOpen: boolean;
@@ -14,6 +15,15 @@ type Props = {
1415
};
1516

1617
const ReviewContainer: React.FC = () => {
18+
const { width } = useWindowDimensions();
19+
const isWindowTooSmall = width < 1100;
20+
if (isWindowTooSmall) {
21+
return (
22+
<Box position="absolute" left={0} bottom={2}>
23+
<ReviewPanel disabled />
24+
</Box>
25+
);
26+
}
1727
return (
1828
<Box position="absolute" left={443} bottom={2}>
1929
<ReviewPanel disabled />

0 commit comments

Comments
 (0)