import {
  IonContent,
  IonHeader,
  IonPage,
  IonTitle,
  IonToolbar,
} from "@ionic/react";
import ExploreContainer from "../components/ExploreContainer";
import "./Tab1.css";
import { useContext } from "react";
import { HelloWorldContext, useHelloWorld } from "../context/Helloworld";

const Tab1: React.FC = () => {
  // let { message } = useContext(HelloWorldContext);
  let { message } = useHelloWorld();

  return (
    <IonPage>
      <IonHeader>
        <IonToolbar>
          <IonTitle>Tab 1</IonTitle>
        </IonToolbar>
      </IonHeader>
      <IonContent fullscreen>
        <IonHeader collapse="condense">
          <IonToolbar>
            <IonTitle size="large">Tab 1</IonTitle>
          </IonToolbar>
        </IonHeader>
        <ExploreContainer name="Tab 1 page" />
        <div>{message} </div>
      </IonContent>
    </IonPage>
  );
};

export default Tab1;
