Skip to content

Commit

Permalink
fix: 웹뷰 피드 작성 remainingHeight 변경 (#939)
Browse files Browse the repository at this point in the history
  • Loading branch information
borimong authored Oct 27, 2024
1 parent 17708c4 commit 20a02a5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/feed/Modal/FeedFormPresentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ function FeedFormPresentation({
const textAreaRef = useRef(null);
const [remainingHeight, setRemainingHeight] = useState(100);
const [selectedMeeting, setSelectedMeeting] = useState<GroupInfo | undefined>(undefined);
const [isMobileDevice, setIsMobileDevice] = useState(false);
const userAgent = navigator.userAgent;

if (/android/i.test(userAgent) || /iPad|iPhone|iPod/.test(userAgent)) {
setIsMobileDevice(true);
}

const handleWindowResize = () => {
setTextareaHeightChangeFlag(flag => !flag);
Expand All @@ -85,7 +91,7 @@ function FeedFormPresentation({
);

const availableHeight = window.innerHeight - allComponentHeights - BasicPadding;
setRemainingHeight(availableHeight);
setRemainingHeight(isMobileDevice ? availableHeight - 44 : availableHeight);
}
}, [textareaHeightChangeFlag]);

Expand Down

0 comments on commit 20a02a5

Please sign in to comment.