Fakultas Ilmu Komputer UI

Commit d60f5768 authored by Mohammad Faraz Abisha Mirza's avatar Mohammad Faraz Abisha Mirza
Browse files

Fix CategoryEcosystemList integration

parent 8a8ad18e
......@@ -8,16 +8,18 @@ import Spacer from "../../components/Spacer/Spacer";
import IconForm from "../../components/Forms/IconForm";
import { getByCategory } from "../../service/firestore/ecosystem/getByCategory";
import { IEcosystem } from "../../types/firestore/ecosystems";
// import { EcosystemStackScreenProps } from "../../types/navigation";
import { EcosystemStackScreenProps } from "../../types/navigation";
const CategoryEcosystemListScreen = () => {
const CategoryEcosystemListScreen = ({
route,
}: EcosystemStackScreenProps<"EcosystemList">) => {
const nav = useNavigation();
// const { toFetch } = route.params;
const { toFetch } = route.params;
const [search, setSearch] = useState("");
const [listData, setListData] = useState<IEcosystem[]>([]);
useEffect(() => {
getByCategory("A").then((res) => setListData(res));
getByCategory(toFetch).then((res) => setListData(res));
});
return (
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment