diff --git a/apps/builddao/widget/components/modals/projects/PotlockImport.jsx b/apps/builddao/widget/components/modals/projects/PotlockImport.jsx index 1d4dc964..03c59611 100644 --- a/apps/builddao/widget/components/modals/projects/PotlockImport.jsx +++ b/apps/builddao/widget/components/modals/projects/PotlockImport.jsx @@ -42,7 +42,13 @@ const [projects, approvedProjects] = useMemo(() => { return [allRegistrations, approvedProjects]; }, allRegistrations); -const [filteredProjects, setFilteredProjects] = useState(approvedProjects); +const [filteredProjects, setFilteredProjects] = useState([]); + +useEffect(() => { + if (!filteredProjects.length) { + setFilteredProjects(approvedProjects); + } +}, [approvedProjects]); const searchByWords = (projects, searchTerm) => { searchTerm = searchTerm.toLowerCase().trim(); @@ -166,6 +172,8 @@ if (showCreateModalProjectId) { ); } +console.log({ filteredProjects, allRegistrations, projects, approvedProjects }); + return (