
import React from "react";
import SignIn from './sign-in'
import { redirect } from "next/navigation";
import {checkIsAuthenticated} from '../../../lib/checkIsAuthenticated'

const SignInPage =async() =>{
  const isAuthenticated = await checkIsAuthenticated();
console.log(isAuthenticated)
    if(isAuthenticated) {
      redirect('/booking')
    }
    else {
      return (
   <SignIn/>
  ); 
    }
 
}

export default SignInPage;
