Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
public
Mímir
Commits
dc6ea972
Commit
dc6ea972
authored
Aug 14, 2020
by
Aron Fiechter
Browse files
Remove unused code
parent
32f9325f
Changes
2
Hide whitespace changes
Inline
Side-by-side
client/src/components/queryResult/NoResultsModal.js
View file @
dc6ea972
...
...
@@ -3,7 +3,7 @@ import Modal from 'react-bootstrap/Modal';
import
Button
from
'
react-bootstrap/Button
'
;
import
noresult
from
'
../../result_not_found.png
'
;
import
{
useDispatch
,
useSelector
}
from
'
react-redux
'
;
import
{
closeNoResultModal
,
selectNoResultModalOpen
,
selectQuery
}
from
'
../navbar/querySlice
'
;
import
{
closeNoResultModal
,
selectNoResultModalOpen
}
from
'
../navbar/querySlice
'
;
import
Card
from
'
react-bootstrap/Card
'
;
export
default
function
NoResultsModal
(
props
)
{
...
...
@@ -17,9 +17,9 @@ export default function NoResultsModal(props) {
<
Modal
show
=
{
noResultModalOpen
}
onHide
=
{
handleClose
}
backdrop
=
'
static
'
backdrop
=
"
static
"
keyboard
=
{
false
}
size
=
'
md
'
size
=
"
md
"
>
<
Modal
.
Header
closeButton
>
<
Modal
.
Title
>
No
results
found
!<
/Modal.Title
>
...
...
@@ -41,10 +41,10 @@ export default function NoResultsModal(props) {
<
/li
>
<
/ul
>
<
/Card.Text
>
<
Card
.
Img
variant
=
'
top
'
src
=
{
noresult
}
/
>
<
Card
.
Img
variant
=
"
top
"
src
=
{
noresult
}
/
>
<
/Modal.Body
>
<
Modal
.
Footer
>
<
Button
variant
=
'
secondary
'
onClick
=
{
handleClose
}
>
<
Button
variant
=
"
secondary
"
onClick
=
{
handleClose
}
>
Close
<
/Button
>
<
/Modal.Footer
>
...
...
client/src/components/queryResult/QueryResult.js
View file @
dc6ea972
import
React
,
{
useState
}
from
'
react
'
;
import
{
selectQuery
,
selectResult
}
from
'
../navbar/querySlice
'
;
import
React
from
'
react
'
;
import
{
selectResult
}
from
'
../navbar/querySlice
'
;
import
Container
from
'
react-bootstrap/Container
'
;
import
{
useSelector
}
from
'
react-redux
'
;
export
default
function
QueryResult
(
props
)
{
export
default
function
QueryResult
()
{
const
nResults
=
useSelector
(
selectResult
)?.
nResults
;
const
query
=
useSelector
(
selectQuery
);
const
allDataText
=
query
?.
fields
?.
find
((
f
)
=>
f
.
key
===
'
allData
'
)?.
value
;
const
queryText
=
allDataText
||
query
?.
fields
?.
find
((
f
)
=>
f
.
value
)?.
value
;
const
displayText
=
<
h5
className
=
"
card-title text-sm-right
"
>
{
nResults
}
results
<
/h5>
;
return
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment