Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed: 안되던 부분들 수정, 미리보기 일단 비활성화 #234 #240

Merged
merged 1 commit into from
Jul 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/components/MyPage/Azone.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,17 @@ function Azone({ myInfo, setPopUp, popUp, setBindingPopUp, bindingPopUp }) {
>
<ProfileBlock
// 기존에 있던 버튼 컴포넌트 재활용_이름 변경 혹은 별도 컴포넌트로 분리 필요
addBlock
setPopUp={setBindingPopUp}
popUp={bindingPopUp}
buttonText='페이지 합치기'
/>
<ProfileBlock setPopUp={setPopUp} popUp={popUp} />
<ProfileBlock
addBlock
setPopUp={setPopUp}
popUp={popUp}
buttonText='프로필 수정'
/>
</div>
</div>
</div>
Expand Down
8 changes: 6 additions & 2 deletions src/components/MyPage/BindingButtonSet.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const BindingButtonSet = (props) => {
<button
type='button'
css={[CommonButtonStyle, WhiteButtonColor]}
onClick={() => setPreviewPopUp(true)}
onClick={saveTemporarily}
>
미리보기
</button>
Expand All @@ -169,7 +169,11 @@ const BindingButtonSet = (props) => {
hasButton={hasButton}
/>
{previewPopUp && (
<BindingPreview inputs={inputs} setPopUp={setPreviewPopUp} />
<BindingPreview
inputs={inputs}
setPopUp={setPreviewPopUp}
userSeq={userSeq}
/>
)}
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/MyPage/BindingPopUp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function BindingPopUp({ userSeq, setPopUp }) {
useEffect(() => {
setInputs({
...inputs,
singlePages: { selectedPages },
singlePages: selectedPages,
});
}, [selectedPages]);

Expand Down
39 changes: 7 additions & 32 deletions src/components/MyPage/BindingPreview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { closeSet } from '../../asset';

const BindingPreview = (props) => {
const { inputs, setPopUp } = props;
const { inputs, setPopUp, userSeq } = props;
const { btn, img } = getAbsoluteBtn(25, 42, 25);

return (
Expand All @@ -25,44 +25,19 @@ const BindingPreview = (props) => {
<img alt='img' height='50px' src={closeSet} />
</div>
</button>
<MultiPage />
<MultiPage pagesData={inputs} userSeq={userSeq} isPreview />
</div>
);
};

export default BindingPreview;

const previewLayout = css`
position: fixed;
position: absolute;
box-sizing: border-box;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 97vw;
max-width: 1483px;
height: 55vw;
max-height: 836px;
@media screen and (max-height: 830px) {
width: 85vw;
height: 48vw;
}
z-index: 12;
padding: 30px 40px 30px 40px;
width: 100%;
height: 100%;
z-index: 1000;
padding: 110px 40px 30px 40px;
background-color: white;
`;

const pagePopUpBoxCloseButton = css`
width: 25px;
height: 25px;
border-radius: 30px;
border: 0;
position: absolute;
left: 95%;
top: 3%;
font-size: 15px;
margin-bottom: 10px;
background-color: lightgray;
&:hover {
background-color: darkgray;
}
`;
1 change: 0 additions & 1 deletion src/components/MyPage/PageBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { useGetPersonalUrl } from '../../hooks/useParamsUrl';
// eslint-disable-next-line no-unused-vars

function PageBlock({ data, popUp, setPopUp, userUrl }) {
console.log(data);
return (
<>
{!data ? (
Expand Down
13 changes: 8 additions & 5 deletions src/pages/MyPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ function MyPage() {
setUserMatched(true);
setNickname(myInfo.nickname);
setUserUrl(myInfo.url);
if (userSeq) requestBZoneData();
if (userSeq) {
requestSinglePagesData();
requestBZoneData();
}
// 다른 사람 페이지일 경우
} else {
setUserMatched(false);
Expand Down Expand Up @@ -104,7 +107,7 @@ function MyPage() {
}, [singlePagesData]);

function bzoneimage() {
console.log(bZoneData);
// console.log(bZoneData);
if (bZoneData && bZoneData.data.message === 'ok') {
const usersb = bZoneData.data.data;

Expand Down Expand Up @@ -144,9 +147,9 @@ function MyPage() {
myInfo={myInfo}
setPopUp={setProfilePopUp}
popUp={profilePopUp}
setBindingPopUp
bindingPopUp
/>{' '}
setBindingPopUp={setBindingPopUp}
bindingPopUp={bindingPopUp}
/>
<hr css={[divLine]} />
<div css={MyPageBZoneWrapper}>
<div css={MyPageBZone}>
Expand Down