Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
GCL_Project1
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
이승윤
2021-06-11 22:43:49 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d4d0213d450a02a1fd0cdae64fb65a510b41e73e
d4d0213d
1 parent
8c811693
feat: 검색 URI 디코딩
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
frontend/src/components/common/Input.js
frontend/src/components/common/Input.js
View file @
d4d0213
...
...
@@ -17,7 +17,6 @@ const InputWrap = styled.div`
width: 70%;
height: 100%;
color:
${
props
=>
inputColorMap
[
props
.
color
].
color
}
;
box-shadow: 2px 3px 28px 1px rgba(0, 0, 0, 0.1);
outline: none;
font-size:
${
props
=>
props
.
size
}
;
border: 3px solid
${
props
=>
inputColorMap
[
props
.
color
].
borderColor
}
;
...
...
@@ -63,7 +62,7 @@ const MyInput = ({
variant
=
"unstyled"
placeholder
=
{
placeholder
}
type
=
"text"
value
=
{
query
}
value
=
{
decodeURIComponent
(
query
)
}
onChange
=
{
e
=>
setQuery
(
e
.
target
.
value
)}
onKeyPress
=
{
e
=>
{
if
(
e
.
key
===
'Enter'
)
{
...
...
@@ -72,7 +71,7 @@ const MyInput = ({
return
;
}
const
params
=
new
URLSearchParams
({
query
});
history
.
push
(
`search?
${
params
.
toString
(
)}
`
);
history
.
push
(
`search?
${
decodeURIComponent
(
params
.
toString
()
)}
`
);
}
}}
/
>
...
...
@@ -80,7 +79,7 @@ const MyInput = ({
<
SearchIconWrap
onClick
=
{()
=>
{
const
params
=
new
URLSearchParams
({
query
});
history
.
push
(
`search?
${
params
.
toString
(
)}
`
);
history
.
push
(
`search?
${
decodeURIComponent
(
params
.
toString
()
)}
`
);
}}
>
<
SearchBox
color
=
"blue"
size
=
"50px"
display
=
{
display
}
/
>
...
...
Please
register
or
login
to post a comment