-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
11 changed files
with
142 additions
and
10 deletions.
There are no files selected for viewing
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
Empty file.
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 @@ | ||
export { default } from './IsQuestionList'; |
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,55 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
import { Link } from 'react-router-dom'; | ||
import NoListImage from '../../../assets/images/illust_4.png' | ||
import Icon from '../../../components/Icon' | ||
const Image = styled.img` | ||
width: 327px; | ||
height: 197px; | ||
`; | ||
const Text = styled.div` | ||
font-family: AppleSDGothicNeoM00; | ||
font-size: 24px; | ||
font-weight: normal; | ||
font-stretch: normal; | ||
font-style: normal; | ||
line-height: 1.33; | ||
letter-spacing: normal; | ||
color: #000000; | ||
`; | ||
const Button = styled.div` | ||
display: flex; | ||
width: 356px; | ||
height: 82px; | ||
margin: 100px 0 0; | ||
border-radius: 10px; | ||
background-image: linear-gradient(to bottom, #2323de, #4848da); | ||
justify-content: center; | ||
align-items: center; | ||
` | ||
const ButtonText = styled.span` | ||
margin-left: 30px; | ||
font-family: AppleSDGothicNeoB00; | ||
font-size: 24px; | ||
font-weight: normal; | ||
font-stretch: normal; | ||
font-style: normal; | ||
line-height: 1.42; | ||
letter-spacing: normal; | ||
color: #ffffff; | ||
`; | ||
|
||
export default function NoList() { | ||
return ( | ||
<> | ||
<Image src={NoListImage}/> | ||
<Text>등록된 질문 리스트가 없습니다.</Text> | ||
<Button> | ||
<Icon type="add_white" alt=""/> | ||
<ButtonText> | ||
질문 리스트 등록하기 | ||
</ButtonText> | ||
</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 @@ | ||
export { default } from './NoList'; |
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,59 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
import styled from 'styled-components'; | ||
import { useSelector } from 'react-redux'; | ||
import { getQuestionListAPI } from '../../repository/questionListRepository'; | ||
import NoList from './NoList/NoList'; | ||
import { get } from '../../utils/snippet'; | ||
|
||
const Wrapper = styled.div` | ||
display: flex; | ||
width: 100%; | ||
height: 100vh; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
`; | ||
|
||
const Title = styled.div` | ||
font-family: AppleSDGothicNeoEB00; | ||
font-size: 36px; | ||
font-weight: normal; | ||
font-stretch: normal; | ||
font-style: normal; | ||
line-height: 1.44; | ||
letter-spacing: normal; | ||
color: #000000; | ||
`; | ||
|
||
const Select = styled.div` | ||
font-family: AppleSDGothicNeoM00; | ||
font-size: 24px; | ||
font-weight: normal; | ||
font-stretch: normal; | ||
font-style: normal; | ||
line-height: 1.33; | ||
letter-spacing: normal; | ||
color: #3d3d3d; | ||
`; | ||
|
||
export default function QuestionListPage() { | ||
const authSelector = useSelector(get('auth')); | ||
const [questionList, setQuestionList] = useState(); | ||
useEffect(() => { | ||
getQuestionListAPI().then((response) => { | ||
setQuestionList(JSON.stringify(response.data)); | ||
}) | ||
}) | ||
|
||
return ( | ||
<> | ||
<Wrapper> | ||
<Title>{authSelector.name}님이 등록한 질문 리스트입니다.</Title> | ||
<Select>연습하고 싶은 질문 리스트를 선택해주세요.</Select> | ||
<NoList /> | ||
</Wrapper> | ||
{/* { questionList.length === 0 ? | ||
<NoList/> : <IsQuestionList />} */} | ||
</> | ||
) | ||
} |
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 @@ | ||
export { default } from './QuestionListPage'; |
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,10 +1,9 @@ | ||
/* eslint-disable no-return-await */ | ||
import api from '../context/serverContext'; | ||
|
||
const LoginApi = async (param) => await api({ | ||
export const LoginApi = async (param) => await api({ | ||
url: '/login', | ||
type: 'post', | ||
param, | ||
}); | ||
|
||
export default LoginApi; |
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,9 @@ | ||
/* eslint-disable no-return-await */ | ||
import api from '../context/serverContext'; | ||
|
||
export const getQuestionListAPI = async (param) => await api({ | ||
url: '/api/self/questionList', | ||
type: 'get', | ||
param, | ||
}); | ||
|
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