Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김서영
/
searchGuide
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김서영
2019-11-25 20:08:23 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
61300541ba05eb6dde20d83ba0cba69e104d1e55
61300541
1 parent
60dfc9bc
add components
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
4 deletions
searchGuide/components/Rate/Rate.js
searchGuide/components/RateBar/RateBar.js
searchGuide/components/RateLine/RateLine.js
searchGuide/components/RateMessage/RateMessage.js
searchGuide/components/Rate/Rate.js
View file @
6130054
...
...
@@ -2,6 +2,7 @@ import React from 'react';
import
{
View
,
Text
}
from
'react-native'
;
import
{
connect
}
from
'react-redux'
import
Icon
from
'react-native-vector-icons/FontAwesome'
;
import
RateMessage
from
'../RateMessage/RateMessage'
;
import
RateSentence
from
'../RateSentence/RateSentence'
;
import
RateBar
from
'../RateBar/RateBar'
;
import
RateLine
from
'../RateLine/RateLine'
;
...
...
@@ -10,8 +11,9 @@ import scoring from '../../lib/scoring';
const
Rate
=
({
score
})
=>
{
return
(
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'#eee'
,
margin
:
0
,
padding
:
0
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
RateMessage
/>
<
RateSentence
/>
<
RateBar
score
=
{
score
}
/
>
<
RateBar
score
=
{
score
}
/>
<
RateLine
/>
<
/View
>
)
...
...
@@ -28,6 +30,6 @@ RateContainer.navigationOptions={
export
default
connect
(
({
search
})
=>
({
score
:
s
coring
(
search
.
result
.
return_data
)
score
:
s
earch
.
score
})
)(
RateContainer
);
\ No newline at end of file
...
...
searchGuide/components/RateBar/RateBar.js
View file @
6130054
...
...
@@ -10,7 +10,7 @@ export default RateBar = (props) => {
return
(
<
Surface
style
=
{
styles
.
surface
}
>
{
props
.
score
.
msg
.
length
?
{
props
.
score
.
msg
?
<>
<
View
style
=
{
styles
.
container
}
>
<
Text
style
=
{
styles
.
Text
}
>
총
점수
:
{
props
.
score
.
full
}
<
/Text
>
...
...
searchGuide/components/RateLine/RateLine.js
View file @
6130054
...
...
@@ -38,7 +38,7 @@ const RateLine = ({load,pastScore }) => {
const
styles
=
StyleSheet
.
create
({
surface
:
{
padding
:
8
,
flex
:
0.
4
,
flex
:
0.
3
,
width
:
'95%'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
...
...
searchGuide/components/RateMessage/RateMessage.js
0 → 100644
View file @
6130054
import
React
,{
useState
}
from
'react'
;
import
{
Surface
,
Text
}
from
'react-native-paper'
;
import
{
StyleSheet
,
View
}
from
'react-native'
;
import
{
connect
}
from
'react-redux'
;
import
PromptSearchRate
from
'../PromptSearch/PromptSearchRate'
;
const
SentenceInfo
=
(
props
)
=>
(
<
View
>
<
Text
style
=
{[
styles
.
Text
,{
color
:
props
.
color
}]}
>
{
props
.
Text
}
<
/Text
>
<
/View>
)
const
RateMessage
=
({
keywordText
,
score
})
=>
{
return
(
<
Surface
style
=
{
styles
.
surface
}
>
{
keywordText
?
<>
<
View
style
=
{{
textAlign
:
"center"
,
height
:
35
}}
>
<
Text
>
길잡이가
교정해준
문장을
확인하세요
!<
/Text
>
<
/View
>
<
View
>
<
Text
style
=
{
styles
.
msg
}
>
{
score
.
msg
}
<
/Text
>
<
/View
>
<
View
>
<
SentenceInfo
Text
=
{
keywordText
}
color
=
{
'#281e94'
}
/
>
<
/View>
<
/
>
:
<
PromptSearchRate
/>
}
<
/Surface
>
)
}
const
styles
=
StyleSheet
.
create
({
surface
:
{
padding
:
8
,
flex
:
0.3
,
width
:
'95%'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
elevation
:
2
,
marginTop
:
10
},
Text
:{
fontSize
:
25
,
textAlign
:
'center'
},
infoText
:{
fontSize
:
20
,
textAlign
:
'center'
},
msg
:{
fontSize
:
20
,
textAlign
:
'center'
,
},
});
const
RateMessageContainer
=
(
{
keywordText
,
score
}
)
=>
(
<
RateMessage
keywordText
=
{
keywordText
}
score
=
{
score
}
/
>
);
export
default
connect
(
({
search
})
=>
({
keywordText
:
search
.
result
.
return_data
.
keywordText
,
score
:
search
.
score
})
)(
RateMessageContainer
);
\ No newline at end of file
Please
register
or
login
to post a comment