
import React from "react";

import { redirect } from "next/navigation";
import BookingPage from './booking'
import {checkIsAuthenticated} from '../../lib/checkIsAuthenticated'
import { auth } from "../../auth";

const Booking =async() => {
  const isAuthenticated = await checkIsAuthenticated();
    const isloggedIn = auth.name
   // console.log(isloggedIn)
    if(isAuthenticated) {
     return( <BookingPage/>)
    }
    else {
      redirect('/auth/sign_in')
   
   
    }
 
}

export default Booking;
 