From 52b7bc4c5a952d20d2ada60d02dbaba3a5dddb9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=ED=95=9C=EC=98=81=28Ryan=29?= Date: Fri, 11 Oct 2024 15:27:06 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8D=B0=EB=B2=A8=EC=97=85=20v2.0.2=20Release?= =?UTF-8?q?=20(#665)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 풀이 태그 버그 해결 (issue #661) (#663) * fix: 미션 태그 버그 해결 * refactor: 사용하지 않는 코드 제거 * 런칭 직전 QA 이후 수정사항 반영 (#664) * fix: 풀이 본문 마크다운 설정 및 카드 overflow ellipsis 적용 * fix: 미션 시작하기 클릭 시 모달이 뜨지 않도록 수정 --------- Co-authored-by: JEON TAEHEON --------- Co-authored-by: Minji <121149171+chosim-dvlpr@users.noreply.github.com> Co-authored-by: JEON TAEHEON --- frontend/src/apis/solutions.ts | 1 - .../MissionDetail/MissionDetailButtons.tsx | 1 - .../SolutionDetail/SolutionSection.styled.ts | 4 ++-- frontend/src/components/SolutionDetail/index.tsx | 2 +- .../components/common/InfoCard/InfoCard.styled.ts | 12 +++++++++++- frontend/src/pages/SolutionListPage/index.tsx | 2 +- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/frontend/src/apis/solutions.ts b/frontend/src/apis/solutions.ts index bd525c30..c440a06d 100644 --- a/frontend/src/apis/solutions.ts +++ b/frontend/src/apis/solutions.ts @@ -1,6 +1,5 @@ import { develupAPIClient } from '@/apis/clients/develupClient'; import { PATH } from '@/apis/paths'; -import { HASHTAGS } from '@/constants/hashTags'; import type { HashTag } from '@/types'; import type { Solution, SubmittedSolution } from '@/types/solution'; diff --git a/frontend/src/components/MissionDetail/MissionDetailButtons.tsx b/frontend/src/components/MissionDetail/MissionDetailButtons.tsx index 84c42c52..2330600c 100644 --- a/frontend/src/components/MissionDetail/MissionDetailButtons.tsx +++ b/frontend/src/components/MissionDetail/MissionDetailButtons.tsx @@ -31,7 +31,6 @@ export default function MissionDetailButtons({ const [isMissionStarted, setIsMissionStarted] = useState(isStarted); const handleStartMission = () => { - handleModalOpen(); setIsMissionStarted(true); }; diff --git a/frontend/src/components/SolutionDetail/SolutionSection.styled.ts b/frontend/src/components/SolutionDetail/SolutionSection.styled.ts index 872963b6..f8bb88af 100644 --- a/frontend/src/components/SolutionDetail/SolutionSection.styled.ts +++ b/frontend/src/components/SolutionDetail/SolutionSection.styled.ts @@ -2,6 +2,7 @@ import styled from 'styled-components'; import javaIcon from '@/assets/images/java.svg'; import GithubLogo from '@/assets/images/githubLogo.svg'; import { Link } from 'react-router-dom'; +import SanitizedMDPreview from '../common/SanitizedMDPreview'; export const SolutionDetailTitle = styled.h2` margin: 4rem 0 2rem 0; @@ -103,7 +104,7 @@ export const CodeViewButtonWrapper = styled.div` margin: 3rem 0; `; -export const SolutionDescription = styled.div` +export const SolutionDescription = styled(SanitizedMDPreview)` margin-top: 3rem; ${({ theme }) => theme.font.body} `; @@ -120,4 +121,3 @@ export const SolutionDescriptionBottom = styled.div` export const CodeViewButtonLink = styled(Link)` display: contents; `; - diff --git a/frontend/src/components/SolutionDetail/index.tsx b/frontend/src/components/SolutionDetail/index.tsx index 58512e70..8d9c31fa 100644 --- a/frontend/src/components/SolutionDetail/index.tsx +++ b/frontend/src/components/SolutionDetail/index.tsx @@ -27,7 +27,7 @@ export default function SolutionSection({ solution }: SolutionDetailProps) { - {description} + {userInfo?.id === solution.member.id && ( )} diff --git a/frontend/src/components/common/InfoCard/InfoCard.styled.ts b/frontend/src/components/common/InfoCard/InfoCard.styled.ts index 76076ee2..6a622bb7 100644 --- a/frontend/src/components/common/InfoCard/InfoCard.styled.ts +++ b/frontend/src/components/common/InfoCard/InfoCard.styled.ts @@ -14,13 +14,23 @@ export const TitleWrapper = styled.div` `; export const Title = styled.div` + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + ${(props) => props.theme.font.bodyBold} `; export const Description = styled.div` - ${(props) => props.theme.font.body} + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + text-overflow: ellipsis; + color: ${(props) => props.theme.colors.grey500}; margin-top: 0.5rem; + ${(props) => props.theme.font.body} `; export const TagWrapper = styled.ul` diff --git a/frontend/src/pages/SolutionListPage/index.tsx b/frontend/src/pages/SolutionListPage/index.tsx index afb5a9f2..5dc6c77e 100644 --- a/frontend/src/pages/SolutionListPage/index.tsx +++ b/frontend/src/pages/SolutionListPage/index.tsx @@ -12,7 +12,7 @@ export default function SolutionListPage() { const [selectedHashTag, setSelectedHashTag] = useState<{ id: number; name: string } | null>(null); const { data: allHashTags } = useHashTags(); - const { data: allMissions } = useMissions(selectedHashTag?.name); + const { data: allMissions } = useMissions(); return (