File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,4 +8,5 @@ export {default as CopyShapeSource} from "./core/CopyShapeSource";
88// utils
99export { default as Header } from "./utils/Header" ;
1010export { default as ShapeList } from './utils/ShapeList' ;
11- export { default as Radios } from './utils/Radios' ;
11+ export { default as Radios } from './utils/Radios' ;
12+ export { default as NoShapeFound } from './utils/NoShapeFound' ;
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ const Header = ({
170170 value = { searchTerm }
171171 onChange = { ( e ) => setSearchTerm ( e . target . value ) }
172172 />
173- < CloseIcon title = "Clear Search Query" color = '#ffffff' size = '24px' onClick = { ( ) => setSearchTerm ( '' ) } />
173+ { searchTerm && < CloseIcon title = "Clear Search Query" color = '#ffffff' size = '24px' onClick = { ( ) => setSearchTerm ( '' ) } /> }
174174 </ NavbarSearchInput >
175175 < DropdownButton variant = "outline-secondary" size = "sm" id = "dropdown-basic-button" title = { `Sort by ${ sort } ` } className = "border-0" >
176176 < Dropdown . Item
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+
3+ const NoShapeFound = ( ) => {
4+
5+ return (
6+ < h1 > No Shape Found!</ h1 >
7+ )
8+ } ;
9+
10+ export default NoShapeFound ;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ import { BiExport } from "react-icons/bi";
2828import { BsFillHeartFill , BsHeart } from "react-icons/bs" ;
2929
3030// Export Shape
31- import { ExportShape , CopyShapeSource } from '..' ;
31+ import { ExportShape , CopyShapeSource , NoShapeFound } from '..' ;
3232
3333// misc unitless
3434import { getShapeFileName , getShapeId } from '../../utils/misc' ;
@@ -347,6 +347,8 @@ const ShapeList = (
347347 }
348348 } ;
349349
350+
351+
350352 return (
351353 < ShapeCardsContainer >
352354 < Container >
@@ -362,7 +364,8 @@ const ShapeList = (
362364 shape = { shapeToSourceCopy } />
363365 }
364366
365- { filteredShape . map ( ( shape , index ) => (
367+ {
368+ filteredShape . length === 0 ? < NoShapeFound /> : filteredShape . map ( ( shape , index ) => (
366369 < React . Fragment key = { index } >
367370 < ShapeCard >
368371 < ShapeCardBody >
You can’t perform that action at this time.
0 commit comments