Fakultas Ilmu Komputer UI

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

Merge branch 'category-ecosystem-list' into 'master'

Fix CategoryEcosystemList integration

See merge request !99
parents 8a8ad18e d60f5768
Pipeline #86268 passed with stage
in 8 minutes and 50 seconds
...@@ -8,16 +8,18 @@ import Spacer from "../../components/Spacer/Spacer"; ...@@ -8,16 +8,18 @@ import Spacer from "../../components/Spacer/Spacer";
import IconForm from "../../components/Forms/IconForm"; import IconForm from "../../components/Forms/IconForm";
import { getByCategory } from "../../service/firestore/ecosystem/getByCategory"; import { getByCategory } from "../../service/firestore/ecosystem/getByCategory";
import { IEcosystem } from "../../types/firestore/ecosystems"; 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 nav = useNavigation();
// const { toFetch } = route.params; const { toFetch } = route.params;
const [search, setSearch] = useState(""); const [search, setSearch] = useState("");
const [listData, setListData] = useState<IEcosystem[]>([]); const [listData, setListData] = useState<IEcosystem[]>([]);
useEffect(() => { useEffect(() => {
getByCategory("A").then((res) => setListData(res)); getByCategory(toFetch).then((res) => setListData(res));
}); });
return ( 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