From ad2a37974997344d036a89dc750d3fb7b3bd62c8 Mon Sep 17 00:00:00 2001 From: semnil5202 Date: Wed, 27 Sep 2023 17:16:09 +0900 Subject: [PATCH 1/3] =?UTF-8?q?design:=20=EB=AA=A8=EB=93=A0=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EC=97=90=EC=84=9C=20=EC=A7=80=EB=8F=84=20?= =?UTF-8?q?=EC=83=81,=20=EC=82=AC=EC=9D=B4=EB=93=9C=EB=B0=94=20=ED=95=98?= =?UTF-8?q?=20=EA=B3=A0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/Layout/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/components/Layout/index.tsx b/frontend/src/components/Layout/index.tsx index 39af46f4e..0cfa57fa4 100644 --- a/frontend/src/components/Layout/index.tsx +++ b/frontend/src/components/Layout/index.tsx @@ -97,7 +97,6 @@ const MediaWrapper = styled.section<{ overflow: hidden; @media (max-width: 1076px) { flex-direction: ${({ $isAddPage, $layoutWidth }) => { - if ($isAddPage) return 'column'; if ($layoutWidth === '372px') return 'column-reverse'; }}; } From 9c82797a93d9e84914470ada0be07c454420ca51 Mon Sep 17 00:00:00 2001 From: semnil5202 Date: Wed, 27 Sep 2023 17:16:59 +0900 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20=EC=A7=80=EB=8F=84=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EB=B0=8F=20=ED=95=80=20=EC=83=9D=EC=84=B1=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90=EC=84=9C=20=EA=B8=B0?= =?UTF-8?q?=EC=A1=B4=20=EC=9E=94=EB=A5=98=20=ED=95=80=20=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/NewPin.tsx | 10 ++++++++-- frontend/src/pages/NewTopic.tsx | 30 +++++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/NewPin.tsx b/frontend/src/pages/NewPin.tsx index c639f2e3f..ff2b5c3c7 100644 --- a/frontend/src/pages/NewPin.tsx +++ b/frontend/src/pages/NewPin.tsx @@ -37,7 +37,8 @@ const NewPin = () => { const [topic, setTopic] = useState(null); const [selectedTopic, setSelectedTopic] = useState(null); const [showedImages, setShowedImages] = useState([]); - const { clickedMarker } = useContext(MarkerContext); + const { clickedMarker, markers, removeMarkers, removeInfowindows } = + useContext(MarkerContext); const { clickedCoordinate, setClickedCoordinate } = useContext(CoordinatesContext); const { formValues, errorMessages, onChangeInput } = @@ -228,6 +229,11 @@ const NewPin = () => { } }; + if (!topicId && markers && markers.length > 0) { + removeMarkers(); + removeInfowindows(); + } + getTopicId(); }, []); @@ -307,7 +313,6 @@ const NewPin = () => { onChangeInput={onChangeInput} tabIndex={1} errorMessage={errorMessages.name} - autoFocus maxLength={50} /> @@ -364,6 +369,7 @@ const NewPin = () => { 추가하기 + diff --git a/frontend/src/pages/NewTopic.tsx b/frontend/src/pages/NewTopic.tsx index bd927fcb4..11de14312 100644 --- a/frontend/src/pages/NewTopic.tsx +++ b/frontend/src/pages/NewTopic.tsx @@ -1,4 +1,4 @@ -import { useContext, useState } from 'react'; +import { useContext, useEffect, useState } from 'react'; import Text from '../components/common/Text'; import Flex from '../components/common/Flex'; import Space from '../components/common/Space'; @@ -18,6 +18,7 @@ import usePost from '../apiHooks/usePost'; import AuthorityRadioContainer from '../components/AuthorityRadioContainer'; import styled from 'styled-components'; import useCompressImage from '../hooks/useCompressImage'; +import { MarkerContext } from '../context/MarkerContext'; type NewTopicFormValuesType = Omit; @@ -36,6 +37,8 @@ const NewTopic = () => { image: '', }); const { compressImage } = useCompressImage(); + const { markers, removeMarkers, removeInfowindows } = + useContext(MarkerContext); const [isPrivate, setIsPrivate] = useState(false); // 혼자 볼 지도 : 같이 볼 지도 const [isAllPermissioned, setIsAllPermissioned] = useState(true); // 모두 : 지정 인원 @@ -137,10 +140,17 @@ const NewTopic = () => { setShowImage(URL.createObjectURL(file)); }; + useEffect(() => { + if (!pulledPinIds && markers && markers.length > 0) { + removeMarkers(); + removeInfowindows(); + } + }, []); + return (
- @@ -237,11 +247,25 @@ const NewTopic = () => { 생성하기 - + + ); }; +const Wrapper = styled(Flex)` + margin: 0 auto; + + @media (max-width: 1076px) { + width: calc(50vw - 40px); + } + + @media (max-width: 744px) { + width: ${({ width }) => width}; + margin: 0 auto; + } +`; + const ImageInputLabel = styled.label` height: 40px; padding: 10px 10px; From f2774146c4cc516014ded9d2b78b0a58f13203fe Mon Sep 17 00:00:00 2001 From: semnil5202 Date: Wed, 27 Sep 2023 17:17:11 +0900 Subject: [PATCH 3/3] =?UTF-8?q?design:=20=EB=AA=A8=EC=95=84=EB=B3=B4?= =?UTF-8?q?=EA=B8=B0=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=B0=98=EC=9D=91?= =?UTF-8?q?=ED=98=95=EC=8B=9C=20=EC=A4=91=EC=95=99=20=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/SeeTogetherTopics.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/SeeTogetherTopics.tsx b/frontend/src/pages/SeeTogetherTopics.tsx index c949b83c0..a4c5a0af6 100644 --- a/frontend/src/pages/SeeTogetherTopics.tsx +++ b/frontend/src/pages/SeeTogetherTopics.tsx @@ -130,6 +130,8 @@ const Wrapper = styled.section<{ width: '372px' | '100vw' }>` height: 100%; display: flex; flex-direction: column; + + margin: 0 auto; `; const WrapperWhenEmpty = styled.section<{ width: '372px' | '100vw' }>` @@ -139,11 +141,13 @@ const WrapperWhenEmpty = styled.section<{ width: '372px' | '100vw' }>` flex-direction: column; justify-content: center; align-items: center; + + margin: 0 auto; `; const ButtonsWrapper = styled.div` display: flex; - justify-content: center; + justify-content: end; align-items: center; `;