EscolaLMS/Front

View on GitHub
src/components/Webinars/List/WebinarsContainer/index.tsx

Summary

Maintainability
A
3 hrs
Test Coverage
import { useContext } from "react";
import { EscolaLMSContext } from "@escolalms/sdk/lib/react";
import CategoriesSection from "../../../Categories/CategoriesSection";
import WebinarsHeader from "../WebinarsHeader";
import WebinarsContainerItems from "./Items";

const WebinarsContainer = () => {
  const { categoryTree } = useContext(EscolaLMSContext);

  return (
    <>
      <WebinarsHeader />
      <WebinarsContainerItems />
      {categoryTree && (
        <>
          <CategoriesSection
            categories={
              categoryTree.list?.filter((category) => !!category.icon) || []
            }
          />
        </>
      )}
    </>
  );
};

export default WebinarsContainer;