bruno/renderer/components/Sidebar/Collections/index.js

22 lines
584 B
JavaScript
Raw Normal View History

2022-10-01 14:47:33 +02:00
import React, { useEffect, useState } from 'react';
import { useSelector } from 'react-redux';
2021-12-03 20:37:38 +01:00
import Collection from './Collection';
2022-10-01 14:47:33 +02:00
const Collections = ({searchText}) => {
const collections = useSelector((state) => state.collections.collections);
2022-09-28 22:32:17 +02:00
console.log(collections);
2021-12-03 20:37:38 +01:00
return (
<div className="mt-4 flex flex-col">
{collections && collections.length ? collections.map((c) => {
return <Collection
2022-10-01 14:47:33 +02:00
searchText={searchText}
2021-12-03 20:37:38 +01:00
collection={c}
2022-03-13 13:13:21 +01:00
key={c.uid}
2021-12-03 20:37:38 +01:00
/>
}) : null}
</div>
);
};
export default Collections;