Skip to content

Commit

Permalink
Merge pull request #341 from HA-SEUNG-JEONG/bugFix/haseung
Browse files Browse the repository at this point in the history
๋น„๋กœ๊ทธ์ธ ์ƒํƒœ์ผ ๋•Œ์—์„œ์˜ UX/UI ๋ณ€๊ฒฝ
  • Loading branch information
HA-SEUNG-JEONG authored May 19, 2024
2 parents ade6d53 + bb85b97 commit 19fa08a
Showing 1 changed file with 46 additions and 8 deletions.
54 changes: 46 additions & 8 deletions src/components/pages/postPage/questionDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,33 @@ import Pagination from '../../ui/Pagination.tsx';
import { useSelector } from 'react-redux';
import axios from 'axios';

const LoginButton = styled.button`
letter-spacing: -0.7px;
background-color: #ff8d1d !important;
border-radius: 3px;
font-weight: 600;
font-size: 12px;
margin: 2% 10% 0% 48%;
padding: 5px 5px;
width: 15%;
cursor: pointer;
margin: 0;
z-index: 1;
`;

const IsNotLoggedIn = styled.div`
display: flex;
flex-direction: column;
align-items: center;
position: relative;
top: 17%;
gap: 5px;
span {
font-family: 'Pretendard-Semibold';
}
`;

const ContentBlur = styled.span<{ $isLoggedIn: boolean }>`
${({ $isLoggedIn }) =>
!$isLoggedIn &&
Expand Down Expand Up @@ -114,6 +141,9 @@ interface AppState {

function QuestionDetailPage() {
const navigate = useNavigate();
const handleClickLogin = () => {
navigate('/login');
};

const { questionId } = useParams();

Expand Down Expand Up @@ -393,6 +423,7 @@ function QuestionDetailPage() {
</div>
</div>
<FirstLine />

{isShowReportModal && (
<div onClick={handleOutSideClick} className="report-popup-overlay">
<div className="report-popup">
Expand Down Expand Up @@ -440,7 +471,13 @@ function QuestionDetailPage() {
</button>
</div>
) : null}

{!isLoggedIn && (
<IsNotLoggedIn>
<span>์ด ์งˆ๋ฌธ์˜ ๋‹ต๋ณ€์ด ๊ถ๊ธˆํ•˜์‹ ๊ฐ€์š”?</span>
<span>๋กœ๊ทธ์ธ ํ•˜์‹œ๊ณ  ๋‹ต๋ณ€์„ ํ™•์ธํ•ด๋ณด์„ธ์š”</span>
<LoginButton onClick={handleClickLogin}>๋กœ๊ทธ์ธ ํ•˜๋Ÿฌ๊ฐ€๊ธฐ</LoginButton>
</IsNotLoggedIn>
)}
<ContentBlur $isLoggedIn={isLoggedIn}>
<AnswerList>
<div className="answer-title">
Expand All @@ -464,14 +501,15 @@ function QuestionDetailPage() {
/>
))}
</AnswerList>
<TabBar />
<Pagination
currentPage={currentPage}
totalPages={totalPages}
handlePagination={handlePagination}
className={answers.length === 0 ? 'hidden' : ''}
/>
</ContentBlur>

<TabBar />
<Pagination
currentPage={currentPage}
totalPages={totalPages}
handlePagination={handlePagination}
className={answers.length === 0 ? 'hidden' : ''}
/>
</StyledPage>
);
}
Expand Down

0 comments on commit 19fa08a

Please sign in to comment.