Skip to content

Commit

Permalink
Merge pull request #333 from JayJayleee/hotfix/#329-bug-fix
Browse files Browse the repository at this point in the history
UI ๊ฐœ์„  ์‚ฌํ•ญ ์ ์šฉ
  • Loading branch information
JayJayleee authored May 14, 2024
2 parents 7cd78b4 + 491cfab commit 2401f9d
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 24 deletions.
8 changes: 8 additions & 0 deletions src/asset/sass/pages/myPage/infoEditPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,11 @@
margin: 4% 0% 0% 12%;
width: 79%;
}

.nick-disclaimer{
font-size : 1.5rem;
color : #474646;
font-family : pretendard-SemiBold;
letter-spacing: -1px;
margin-top:1rem;
}
6 changes: 5 additions & 1 deletion src/asset/sass/pages/myPage/noticePage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
cursor: pointer;
outline: none;
padding-top: 4rem;
width : 91%;
line-height : 1.5rem;
white-space : pre-wrap;
}

.notice-item-container {
Expand Down Expand Up @@ -73,7 +76,7 @@
max-height: 0;
width: 95%;
box-sizing: border-box;
margin: 5% 0% 5% 8.2%;
margin : 8% 0% 5% 8.1%;
display: block;
font-size: 1.8rem;
letter-spacing: -1px;
Expand Down Expand Up @@ -109,6 +112,7 @@
.notice-list.active .panel {
max-height: 326px;
font-size: 12px;

}

.notice-button-container {
Expand Down
18 changes: 16 additions & 2 deletions src/components/pages/myPage/feedbackPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useState, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import '../../../asset/sass/pages/myPage/feedbackPage.scss';
import { StyledPage, StyledHeader } from '../../../styledComponent.js';
Expand All @@ -10,12 +10,20 @@ import { showErrorToast, showSuccessToast } from '../../ui/toast/toast.tsx';
import { BASE_URL, ACCESS_TOKEN } from '../../global/constants/index.ts';

function FeedbackPage() {
const [contact, setcontact] = useState('');

useEffect(()=>{
if (contact.length >=250){
showErrorToast('ํ”ผ๋“œ๋ฐฑ์€ 250์ž ๊นŒ์ง€ ์ž…๋ ฅ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.');
}
},[contact])

const navigate = useNavigate();

const handleGoBack = () => {
navigate(-1);
};
const [contact, setcontact] = useState('');


const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
const value = e.target.value;
Expand All @@ -29,6 +37,11 @@ function FeedbackPage() {
return;
}

if (contact.length >250){
showErrorToast('ํ”ผ๋“œ๋ฐฑ์„ 250์ž ์ดํ•˜๋กœ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”.');
return;
}

const body = { content: contact };
const response = await fetch(`${BASE_URL}/api/feedback`, {
method: 'POST',
Expand Down Expand Up @@ -76,6 +89,7 @@ function FeedbackPage() {
value={contact}
handleChange={handleChange}
variant={'round'}
maxLength={250}
/>

<Button
Expand Down
6 changes: 4 additions & 2 deletions src/components/pages/myPage/infoEditPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Divider = styled.div`
height: 1px;
background-color: rgba(217, 217, 217, 1);
width: 79%;
margin: 5% 0% 0% 12%;
margin: 3% 0% 0% 12%;
`;

function InfoEditPage() {
Expand Down Expand Up @@ -154,7 +154,9 @@ function InfoEditPage() {
>
๋ณ€๊ฒฝ
</div>
</div>
</div>
<div className="nick-disclaimer">* ๋‹‰๋„ค์ž„ ๋ณ€๊ฒฝ ์‹œ, ๋ถ•์–ด๋นต 20๊ฐœ๊ฐ€ ์ฐจ๊ฐ๋ฉ๋‹ˆ๋‹ค </div>

</div>
</div>
<Divider />
Expand Down
31 changes: 17 additions & 14 deletions src/components/pages/myPage/noticePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,25 @@ function NoticePage() {
const [totalPages, setTotalPages] = useState(0);
const [notices, setNotices] = useState<Notice[]>([]);
const navigate = useNavigate();

const fetchNotices = async () => {
try {
const notices = await fetchAPI(
`/api/notice?pageNo=${currentPage}&criterion=createdAt`,
'GET',
);
// console.log('Notices:', notices);
setTotalPages(notices.data.totalPages);
setNotices(notices.data.notices);
} catch (error) {
console.error(error);
}
};

useEffect(() => {
const fetchNotices = async () => {
try {
const notices = await fetchAPI(
`/api/notice?pageNo=${currentPage}&criterion=createdAt`,
'GET',
);
// console.log('Notices:', notices);
setTotalPages(notices.data.totalPages);
setNotices(notices.data.notices);
} catch (error) {
console.error(error);
}
};
fetchNotices();
}, [currentPage]);
}, [currentPage, navigate]);

const handlePanelToggle = (index) => {
setActivePanelIndex(activePanelIndex === index ? null : index);
};
Expand Down
6 changes: 3 additions & 3 deletions src/components/ui/contactSlider/contactList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@
display: flex;
justify-content: center;
align-items: center;
height: 55px;
width: 55px;
margin-bottom: 3rem;
height: 105px;
width: 105px;
margin: -12rem 0 3rem 0;
}

.inquiry-content-answer-tag {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/contactSlider/contactSlider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const StatusBar = styled.div`
`;

const StatusTab = styled.div`
width: 245px;
width: 255px;
letter-spacing: -1px;
text-align: center;
padding: 10px 0;
Expand Down
3 changes: 2 additions & 1 deletion src/components/ui/header/userInfoHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ function UserInfoHeader() {
if (menu === '๋งˆ์ดํŽ˜์ด์ง€') {
navigate('/mypage');
} else if (menu === '์ƒ์ ') {
navigate('/store');
// navigate('/store');
showErrorToast("์ค€๋น„์ค‘์ธ ํŽ˜์ด์ง€์ž…๋‹ˆ๋‹ค.")
// } else if (menu === '๋ฉ”์ธ') {
// navigate('/');
} else if (menu === '๋กœ๊ทธ์•„์›ƒ') {
Expand Down

0 comments on commit 2401f9d

Please sign in to comment.