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-13 13:59:42 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7ebab06c8cf11250ba1b17fe18d3703dc57fa1aa
7ebab06c
1 parent
2ae4b8e1
chore: console 제거
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
15 deletions
frontend/.eslintrc.json
frontend/src/components/Documents.js
frontend/src/components/document/Thumbnail.js
frontend/src/components/document/index.js
frontend/src/pages/SearchPage.js
frontend/.eslintrc.json
View file @
7ebab06
...
...
@@ -15,7 +15,8 @@
"react/jsx-fragments"
:
0
,
"react/prop-types"
:
0
,
"import/prefer-default-export"
:
0
,
"no-param-reassign"
:
0
"no-param-reassign"
:
0
,
"arrow-body-style"
:
0
,
},
"settings"
:
{
"react"
:
{
...
...
frontend/src/components/Documents.js
View file @
7ebab06
...
...
@@ -2,9 +2,8 @@ import React from 'react';
import
Document
from
'./document'
;
const
Documents
=
({
datas
})
=>
{
console
.
log
(
datas
);
return
(
<>
<
div
>
{
datas
.
map
(
data
=>
{
const
{
content
,
...
...
@@ -14,7 +13,6 @@ const Documents = ({ datas }) => {
writer
,
images
,
}
=
data
;
console
.
log
(
data
);
return
(
<
Document
content
=
{
content
.
raw
}
...
...
@@ -26,7 +24,7 @@ const Documents = ({ datas }) => {
/>
);
})}
<
/>
<
/
div
>
);
};
...
...
frontend/src/components/document/Thumbnail.js
View file @
7ebab06
...
...
@@ -15,6 +15,7 @@ const ImageWrapper = styled.div`
`
;
const
Thumbnails
=
({
srcs
})
=>
{
const
[
lists
,
setLists
]
=
useState
([]);
console
.
log
(
srcs
);
const
placeholder
=
()
=>
{
if
(
srcs
.
length
<
4
)
{
const
list
=
[];
...
...
@@ -31,7 +32,7 @@ const Thumbnails = ({ srcs }) => {
};
useEffect
(()
=>
{
placeholder
();
},
[]);
},
[
srcs
]);
return
(
<>
<
Text
style
=
{{
marginTop
:
'1rem'
}}
size
=
"lg"
weight
=
{
500
}
>
...
...
frontend/src/components/document/index.js
View file @
7ebab06
...
...
@@ -13,7 +13,6 @@ const Document = ({
images
,
})
=>
{
const
srcs
=
images
.
map
(
image
=>
JSON
.
parse
(
image
).
image_path
);
console
.
log
(
content
);
const
limit
=
250
;
const
toggleEllipsis
=
(
str
,
_limit
)
=>
({
string
:
str
.
slice
(
0
,
_limit
),
...
...
@@ -30,13 +29,7 @@ const Document = ({
<
File
filename
=
{
filename
}
filepath
=
{
filePath
}
/
>
<
Text
color
=
"green"
>
경로
:
{
filePath
}
<
/Text
>
<
Text
>
{
toggleEllipsis
(
content
,
limit
).
string
}...
<
/Text
>
<
Thumbnails
srcs
=
{
srcs
}
// srcs={[
// 'https://yoonsbucket.s3.amazonaws.com/book_report_1.png',
// 'https://yoonsbucket.s3.amazonaws.com/book_report_2.png',
// ]}
/
>
<
Thumbnails
srcs
=
{
srcs
}
/
>
<
/Container
>
);
};
...
...
frontend/src/pages/SearchPage.js
View file @
7ebab06
...
...
@@ -5,7 +5,6 @@ import Header from '../components/Header';
const
SearchPage
=
()
=>
{
const
{
documents
}
=
useSelector
(
state
=>
state
.
parsedDocuments
);
console
.
log
(
documents
);
return
(
<>
<
Header
/>
...
...
Please
register
or
login
to post a comment