-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Loading 컴포넌트 구현 Loading 컴포넌트 구현 * feat: 질문 상세 페이지 관련 API 구현 - getQuestionDetailContentData : 질문 상세 내용를 가져오는 API - getQuestionAnswerListData : 질문별 답변 리스트를 가져오는 API - postAnswer : 질문을 생성하는 API * feat: 질문 상세 페이지 API 도입 - 질문 상세 내용을 서버에서 가져오는 로직 추가 - 질문 상세 내용에 대한 답변 리스트를 서버에서 가져오는 로직 추가 - 질문 답변을 서버에 업로드하는 로직 추가 - 로딩 상태 관리 로직 추가 * feat: 질문에 대한 답변 API 적용 - 질문 답변 데이터 type 변경 - 질문 답변 API 적용 * refactor: styled-component props 변수명 변경 styled-component에서 사용되고 있던 props의 변수명을 camelCase에서 lowercase로 변경해주었습니다. * refactor: 질문 답변 등록 API body 수정 질문 답변을 등록하는 API의 body 객체에 questionId를 추가했습니다.
- Loading branch information
Showing
14 changed files
with
197 additions
and
104 deletions.
There are no files selected for viewing
Binary file not shown.
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,14 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const LoadingContainer = styled.div` | ||
position: absolute; | ||
top: calc(50% - 2rem); | ||
left: calc(50% - 3rem); | ||
width: 6rem; | ||
height: 6rem; | ||
img { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
`; |
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,15 @@ | ||
import WalkingPenguin from '/images/walking-penguin.webp'; | ||
import { LoadingContainer } from './Loading.styles'; | ||
|
||
const Loading = () => { | ||
return ( | ||
<LoadingContainer> | ||
<picture> | ||
<source srcSet={WalkingPenguin} type="image/webp" /> | ||
<img src="" /> | ||
</picture> | ||
</LoadingContainer> | ||
); | ||
}; | ||
|
||
export default Loading; |
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,28 @@ | ||
import styled from 'styled-components'; | ||
|
||
interface ContainerProps { | ||
isSelected: boolean; | ||
isInteractive: boolean; | ||
isselected: string; | ||
isinteractive: string; | ||
} | ||
|
||
export const Container = styled.button<ContainerProps>` | ||
height: 2rem; | ||
padding: 0.3rem 1rem; | ||
border-radius: 1rem; | ||
border: none; | ||
box-shadow: ${({ isSelected, theme }) => | ||
isSelected ? `0 0 0 1px ${theme.color.grayscale.black} inset` : 'none'}; | ||
background-color: ${({ isSelected, theme }) => | ||
isSelected ? theme.color.grayscale.white : theme.color.grayscale[50]}; | ||
color: ${({ isSelected, theme }) => | ||
isSelected ? theme.color.grayscale.black : theme.color.grayscale[200]}; | ||
box-shadow: ${({ isselected, theme }) => | ||
isselected === 'true' | ||
? `0 0 0 1px ${theme.color.grayscale.black} inset` | ||
: 'none'}; | ||
background-color: ${({ isselected, theme }) => | ||
isselected === 'true' | ||
? theme.color.grayscale.white | ||
: theme.color.grayscale[50]}; | ||
color: ${({ isselected, theme }) => | ||
isselected === 'true' | ||
? theme.color.grayscale.black | ||
: theme.color.grayscale[200]}; | ||
${({ theme }) => theme.font.medium14} | ||
cursor: ${({ isInteractive }) => (isInteractive ? 'pointer' : 'default')}; | ||
cursor: ${({ isinteractive }) => | ||
isinteractive === 'true' ? 'pointer' : 'default'}; | ||
`; |
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
Oops, something went wrong.