Commit 9ec364b8 authored by Aron Fiechter's avatar Aron Fiechter
Browse files

Add button to clear entity in Entity/Info

parent 21b7d91d
Pipeline #879 canceled with stage
...@@ -4,10 +4,15 @@ import Card from 'react-bootstrap/Card'; ...@@ -4,10 +4,15 @@ import Card from 'react-bootstrap/Card';
import ListGroup from 'react-bootstrap/ListGroup'; import ListGroup from 'react-bootstrap/ListGroup';
import Button from 'react-bootstrap/Button'; import Button from 'react-bootstrap/Button';
import ReadMore from './ReadMore'; import ReadMore from './ReadMore';
import { MdClose } from 'react-icons/md';
import { useDispatch } from 'react-redux';
import { clearEntity } from '../voronoiSlice';
export default function Info(props) { export default function Info(props) {
const { node } = props; const { node } = props;
const dispatch = useDispatch();
return ( return (
<Card style={{ width: '100%' }}> <Card style={{ width: '100%' }}>
{node.hasImage && ( {node.hasImage && (
...@@ -46,6 +51,11 @@ export default function Info(props) { ...@@ -46,6 +51,11 @@ export default function Info(props) {
Open in the Archive Open in the Archive
</Button> </Button>
</Card.Footer> </Card.Footer>
<div className="position-absolute w-100 p-sm-2">
<a href="#" className="float-right ml-sm-2" onClick={() => dispatch(clearEntity())}>
<MdClose />
</a>
</div>
</Card> </Card>
); );
} }
Supports Markdown
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