@@ -11,11 +11,11 @@ import { ListItem, AddItems, TextInputElement } from '../components';
1111// operations like filtering and sorting items.
1212
1313export const List = React . memo ( function List ( { data, listPath } ) {
14- // Redirect to home if no list path is null
15- if ( useEnsureListPath ( ) ) return < > </ > ;
1614 const { urgencyObject } = useUrgency ( data ) ;
1715 const [ searchItem , setSearchItem ] = useState ( '' ) ;
1816
17+ // Redirect to home if no list path is nulls
18+ if ( useEnsureListPath ( ) ) return < > </ > ;
1919 const listName = listPath . slice ( listPath . indexOf ( '/' ) + 1 ) ;
2020
2121 const sortedItems = Object . values ( urgencyObject ) . flat ( ) ;
@@ -47,11 +47,14 @@ export const List = React.memo(function List({ data, listPath }) {
4747 columns = { 16 }
4848 justifyContent = "space-between"
4949 >
50- < Grid item size = { { xs : 2 , sm : 4 , md : 4 } } >
50+ < Grid size = { { xs : 2 , sm : 4 , md : 4 } } >
5151 < AddItems items = { data } />
5252 </ Grid >
53- < Grid item size = { { xs : 2 , sm : 4 , md : 4 } } >
54- < form onSubmit = { ( event ) => event . preventDefault ( ) } >
53+ < Grid size = { { xs : 2 , sm : 4 , md : 4 } } >
54+ < form
55+ id = "search-item-form"
56+ onSubmit = { ( event ) => event . preventDefault ( ) }
57+ >
5558 < TextInputElement
5659 id = "search-item"
5760 type = "search"
0 commit comments