"use client";

import React, { useEffect } from "react";
import About_Info from "./about_Info/About_Info";
import { useDispatch, useSelector } from "react-redux";
import {
  getAboutUs,
  getAch_and_ack,
  getContent,
} from "../../features/aboutus/aboutusSlice";
import Counter from "./counter/Counter";
import Our_objective from "./our-objectives/Our_objectives";
import Banner_vdo from "./banner_vdo/Banner_vdo";
import { GetallCounter, GetAllvisionmission } from "../../features/master/masterSlice";

function About_us() {

  const dispatch = useDispatch();

  const about_us = useSelector((state) => state.aboutus.about_us);
  const visionmission = useSelector((state) => state.master.visionmission);
  const counter = useSelector((state) => state.master.counter);
  useEffect(() => {
    dispatch(getAboutUs());
    dispatch(GetAllvisionmission());
    dispatch(GetallCounter());
    dispatch(getAch_and_ack());
  }, [dispatch]);


  return (
    <>
      <Banner_vdo about_us={about_us} />
      <About_Info about_us={about_us} />
      <Our_objective visionmission={visionmission} />
      <Counter counter={counter}/>
    </>
  );
}

export default About_us;
