Skip to content

Commit

Permalink
Merge pull request #535 from Mile-Writings/feat/#534/createTopicModalRes
Browse files Browse the repository at this point in the history
[feat/#534] 모달 placeholder변경
  • Loading branch information
moondda authored Jan 9, 2025
2 parents 249c3df + 503756d commit 361c40b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 deletions.
8 changes: 8 additions & 0 deletions src/constants/modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ export const ADMIN = {
DESC: `글감에 대해 자유롭게 소개해주세요.\nex) 마음이 담긴 선물을 주거나 받은 기억을 떠올려보세요. 그 순간이 당신에게 어떤 의미로 남았는지 이야기해주세요.`,
},
};

export const ADMINMOBILE = {
PLACEHOLER: {
TOPIC: '함께 작성하고 싶은 글감을 입력해주세요',
TAG: '위에 적은 글감을 한 단어로 요약해주세요',
DESC: `글감에 대해 자유롭게 소개해주세요.\nex) 마음이 담긴 선물을 주거나 받은 기억을 떠올려보세요. 그 순간이 당신에게 어떤 의미로 남았는지 이야기해주세요.`,
},
};
29 changes: 21 additions & 8 deletions src/pages/admin/components/RenderAdminContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import InputModal from '../../../components/commons/inputModal/InputModal';
import { DefaultModal, DefaultModalBtn } from '../../../components/commons/modal/DefaultModal';
import Responsive from '../../../components/commons/Responsive/Responsive';
import Spacing from '../../../components/commons/Spacing';
import { ADMIN } from '../../../constants/modal';
import { ADMIN, ADMINMOBILE } from '../../../constants/modal';
import useBlockPageExit from '../../../hooks/useBlockPageExit';
import useModal from '../../../hooks/useModal';
import { MOBILE_MEDIA_QUERY } from '../../../styles/mediaQuery';
Expand Down Expand Up @@ -98,13 +98,26 @@ const RenderAdminContent = ({ menu }: RenderAdminContentPropTypes) => {
{showModal && (
<>
<ModalOverlay onClick={closeModal} />
<InputModal
pageNum={pageNum}
setShowModal={setShowModal}
topicPlaceholder={ADMIN.PLACEHOLER.TOPIC}
tagPlaceholder={ADMIN.PLACEHOLER.TAG}
descPlaceholder={ADMIN.PLACEHOLER.DESC}
/>
<Responsive only="mobile">
{' '}
<InputModal
pageNum={pageNum}
setShowModal={setShowModal}
topicPlaceholder={ADMINMOBILE.PLACEHOLER.TOPIC}
tagPlaceholder={ADMINMOBILE.PLACEHOLER.TAG}
descPlaceholder={ADMINMOBILE.PLACEHOLER.DESC}
/>
</Responsive>
<Responsive only="desktop">
{' '}
<InputModal
pageNum={pageNum}
setShowModal={setShowModal}
topicPlaceholder={ADMIN.PLACEHOLER.TOPIC}
tagPlaceholder={ADMIN.PLACEHOLER.TAG}
descPlaceholder={ADMIN.PLACEHOLER.DESC}
/>
</Responsive>
</>
)}
<Responsive only="desktop">
Expand Down

0 comments on commit 361c40b

Please sign in to comment.