forked from extern/bruno
2313afdb82
feat: search collections, resolves #1
22 lines
584 B
JavaScript
22 lines
584 B
JavaScript
import React, { useEffect, useState } from 'react';
|
|
import { useSelector } from 'react-redux';
|
|
import Collection from './Collection';
|
|
|
|
const Collections = ({searchText}) => {
|
|
const collections = useSelector((state) => state.collections.collections);
|
|
console.log(collections);
|
|
|
|
return (
|
|
<div className="mt-4 flex flex-col">
|
|
{collections && collections.length ? collections.map((c) => {
|
|
return <Collection
|
|
searchText={searchText}
|
|
collection={c}
|
|
key={c.uid}
|
|
/>
|
|
}) : null}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Collections; |