import React from "react";
import { Text, Button } from "react-native";
import ScreenLayout from "../components/layout/ScreenLayout";
import { useDispatch } from "react-redux";
import { logout } from "../store/authSlice";

export default function HomeScreen() {
  const dispatch = useDispatch();

  return (
    <ScreenLayout>
      <Text>Welcome Home!</Text>
      <Button title="Logout" onPress={() => dispatch(logout())} />
    </ScreenLayout>
  );
}
