import React from 'react';
import { useAuth } from '../contexts/authContext';
import AuthenticatedLayout from './AuthenticatedLayout';
import UnauthenticatedLayout from './UnauthenticatedLayout';

const MyLayout: React.FC = () => {

  const {authState} = useAuth();

  return (
    <>
      {authState?.isAuthenticated ? (
        <AuthenticatedLayout />
      ) : (
        <UnauthenticatedLayout />
      )}
    </>
  );
};

export default MyLayout;