Skip to content

Commit

Permalink
Merge branch 'develop' into feat/#86
Browse files Browse the repository at this point in the history
  • Loading branch information
gd06070 committed Dec 9, 2024
2 parents ec6943c + 41806a2 commit 06a77ff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 5 additions & 0 deletions src/components/MainModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,17 @@ import ThreadRescue from '../pages/ThreadRescue';
const MainModal = ({ routeName }) => {
const [currentTabIndex, setTabIndex] = useState(0);
const currentSlaveIndex = useModalStore((state) => state.slaveIndex);
const setSlaveIndex = useModalStore((state) => state.setSlaveIndex);

const modalStatus = useModalStore((state) => state.modalStatus);
const modalData = useModalStore((state) => state.modalData);

useEffect(() => {
document.body.classList.add('prevent-scroll');

return () => {
setSlaveIndex(0);
};
}, []);

/**
Expand Down
5 changes: 2 additions & 3 deletions src/components/common/MainModalCover.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import SignatureImage from './SignatureImage';
import tempOptionList from '../../datas/temp-options-list.json'; // 임시 드롭다운 옵션 데이터

const MainModalCover = ({ isPlaceEdit = null }) => {
const { modalStatus, modalData, toggleModal, setEditMode } = useModalStore(
(state) => state,
);
const { modalStatus, modalData, toggleModal, setEditMode, setSlaveIndex } =
useModalStore((state) => state);

return (
<section id="main-modal-cover" className={`${modalData.threadType}`}>
Expand Down
6 changes: 3 additions & 3 deletions src/datas/modalNavObject.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
{
"label": "댓글",
"value": "reply",
"count": 0,
"count": null,
"slaveNavigations": [
{
"label": "이 장소의 댓글",
Expand Down Expand Up @@ -136,7 +136,7 @@
{
"label": "댓글",
"value": "reply",
"count": 0,
"count": null,
"slaveNavigations": [
{
"label": "이 글타래의 댓글",
Expand Down Expand Up @@ -169,7 +169,7 @@
{
"label": "댓글",
"value": "reply",
"count": 0,
"count": null,
"slaveNavigations": [
{
"label": "이 글타래의 댓글",
Expand Down

0 comments on commit 06a77ff

Please sign in to comment.