-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* remove: front cd yml 파일 삭제 (#341) * 로그아웃 뮤테이션 생성 및 제출시 로직 개선 (issue #306) (#327) * feat: 로그아웃 관련 뮤테이션 생성 * refactor: useModal 리팩토링 * refactor: 불필요한 주석 제거 * fix: 미션 제출 후 새로고침 로직 개선 * refactor: 대쉬보드 프로필 레이아웃 수정 * refactor: description null값도 보낼수 있도록 수정 * refactor: 미션명 검증 섹션 추가 * fix: 린트 disable * refactor: 수정사항 반영 * 해시태그 버튼 및 필터링 구현 (issue #303) (#332) * feat: 미션 리스트 필터링 기능 구현 * refactor: 미션 호출 api의 url 분리 및 queryKey에 filter 추가 * fix: hashTagButton 충돌 해결 * feat: 전체 데이터 불러오는 'all'로 변경, HashTag 필터링 mock data 임시 구현 * feat: 솔루션 필터링 적용, useSolutions를 useSolutionSummaries로 변경 * design: 솔루션 리스트 디자인 수정 * design: 미션리스트 디자인 수정 * feat: api 배포에 따른 mock data 제거 * test: useMissions 필터링 기능 테스트 코드 추가 * design: 미션, 솔루션 리스트 렌더링 시 애니메이션 효과 적용 * refactor: 'all'을 상수로 변경 * refactor: useToggleHashTag 제거 및 해시태그 토글 상태 추가 * chore: 개발 환경과 배포환경에 따른 백엔드 API 경로 수정 (#344) * fix: 대시보드 렌더링 분기처리 오류 수정 (#346) * design: 미션 제출 페이지 중앙 정렬 --------- Co-authored-by: Minji <[email protected]>
- Loading branch information
1 parent
c40d13e
commit 68ae00c
Showing
37 changed files
with
498 additions
and
164 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export const BASE_URL = { | ||
dev: 'https://api.devel-up.co.kr', | ||
dev: 'https://dev.api.devel-up.co.kr', | ||
prod: 'https://api.devel-up.co.kr', | ||
} as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const HashTagListContainer = styled.ul` | ||
display: flex; | ||
flex-direction: row; | ||
gap: 1.5rem; | ||
flex-wrap: wrap; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import type { HashTag } from '@/types'; | ||
import HashTagButton from '../common/HashTagButton'; | ||
import * as S from './HashTagList.styled'; | ||
import { HASHTAGS } from '@/constants/hashTags'; | ||
|
||
interface HashTagListProps { | ||
hashTags: HashTag[]; | ||
selectedHashTag: string; | ||
setSelectedHashTag: (name: string) => void; | ||
} | ||
|
||
export default function HashTagList({ | ||
hashTags, | ||
selectedHashTag, | ||
setSelectedHashTag, | ||
}: HashTagListProps) { | ||
return ( | ||
<S.HashTagListContainer> | ||
{hashTags.map(({ id, name }) => { | ||
const isSelected = name === selectedHashTag; | ||
return ( | ||
<HashTagButton | ||
isSelected={isSelected} | ||
onClick={() => setSelectedHashTag(isSelected ? HASHTAGS.all : name)} | ||
key={id} | ||
> | ||
{name} | ||
</HashTagButton> | ||
); | ||
})} | ||
</S.HashTagListContainer> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,9 @@ | ||
import * as S from './SubmitButton.styled'; | ||
import type { ButtonHTMLAttributes } from 'react'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import { ROUTES } from '@/constants/routes'; | ||
|
||
interface SubmitButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {} | ||
|
||
export default function SubmitButton({ ...props }: SubmitButtonProps) { | ||
const navigate = useNavigate(); | ||
const handleNavigateToSubmit = () => { | ||
navigate(`${ROUTES.solutions}`); | ||
}; | ||
|
||
export default function SubmitButton() { | ||
return ( | ||
<S.Container> | ||
<S.Button type="submit" onClick={handleNavigateToSubmit} {...props}> | ||
제출 | ||
</S.Button> | ||
<S.Button type="submit">제출</S.Button> | ||
</S.Container> | ||
); | ||
} |
21 changes: 16 additions & 5 deletions
21
frontend/src/components/common/HashTagButton/HashTagButton.styled.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const Button = styled.div` | ||
background-color: ${(props) => props.theme.colors.primary50}; | ||
color: ${(props) => props.theme.colors.black}; | ||
interface ButtonProps { | ||
$isSelected: boolean; | ||
} | ||
|
||
export const Button = styled.button<ButtonProps>` | ||
background-color: ${(props) => | ||
props.$isSelected ? props.theme.colors.primary100 : props.theme.colors.primary50}; | ||
color: var(--black-color); | ||
transition: 0.2s; | ||
padding: 1rem 1.6rem; | ||
border-radius: 2rem; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
${(props) => props.theme.font.badge} | ||
padding: 1rem 1.6rem; | ||
border-radius: 2rem; | ||
&:hover { | ||
background-color: ${(props) => | ||
props.$isSelected ? props.theme.colors.primary200 : props.theme.colors.primary100}; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
import type { PropsWithChildren } from 'react'; | ||
import type { HTMLAttributes, PropsWithChildren } from 'react'; | ||
import * as S from './HashTagButton.styled'; | ||
|
||
export default function HashTagButton({ children }: PropsWithChildren) { | ||
return <S.Button>{children}</S.Button>; | ||
interface HashTagButtonProps extends HTMLAttributes<HTMLButtonElement> { | ||
isSelected?: boolean; | ||
} | ||
|
||
export default function HashTagButton({ | ||
isSelected = false, | ||
children, | ||
...props | ||
}: PropsWithChildren<HashTagButtonProps>) { | ||
return ( | ||
<S.Button $isSelected={isSelected} {...props}> | ||
{children} | ||
</S.Button> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const HASHTAGS = { | ||
all: 'all', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.