import { View, Text } from "tamagui";
import { CustomSafeArea } from "@/components/common/CustomSafeArea";
import { CustomHeader } from "@/components/common/CustomHeader";
import { useSessionStore } from "@/stores";
import { useEffect } from "react";
import { useNavigation } from "expo-router";

export default function SessionDetailScreen() {
  const { session, setSession, fetchSessionDetail } = useSessionStore();
  const navigation = useNavigation();

  useEffect(() => {
    console.log("sessionStore.session", session);
    fetchSessionDetail();
  }, []);

  useEffect(() => {
    return () => setSession(null);
  }, [setSession]);

  return (
    <CustomSafeArea>
      <CustomHeader title={session?.name}></CustomHeader>
      <View>
        <Text>SessionDetailScreen</Text>
      </View>
    </CustomSafeArea>
  );
}

