Commit dc6ea972 authored by Aron Fiechter's avatar Aron Fiechter
Browse files

Remove unused code

parent 32f9325f
......@@ -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>
......
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 (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment