import Cart from "./cart";
import { redirect } from 'next/navigation'
import React from 'react'
import {auth, signOut} from '../../auth'
//import { useSession } from "next-auth/react";


 
async function BookingPage({ searchParams }) {
  // const {session} =  auth();
  const {name} = (await auth()).user;
   //const user = session;
 //  const {name} = session
  //  const isLoggedIn = status ==='authenticated'
 // if(!session?.user)    redirect('/register')
    
 //console.log(isLoggedIn)

  return (
    <div>
      <section className="py-10 bg-gray-100 sm:py-16 lg:py-24">
        <div className="px-4 mx-auto sm:px-6 lg:px-8 max-w-7xl">
          <div className="grid items-center grid-cols-1 gap-y-8 lg:grid-cols-2 gap-x-16 xl:gap-x-24">
            <div className="relative mb-12">
              <img
                className="w-full rounded-md"
                src="image/team-pic.jfif"
                alt=""
              />

              <div className="absolute w-full max-w-xs px-4 -translate-x-1/2 sm:px-0 sm:max-w-sm left-1/2 -bottom-12">
                <div className="overflow-hidden bg-white rounded">
                  <div className="px-10 py-6">
                    <div className="flex items-center">
                      <p className="flex-shrink-0 text-3xl font-bold text-blue-600 sm:text-4xl">
                      50%
                      </p>
                      <p className="pl-6 text-sm font-medium text-black sm:text-lg">
                        High Conversions <br />
                        on Products listed here
                      </p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
           <Cart name={name}/>
          </div>
        </div>
      </section>
    </div>
  );
}

export default BookingPage;
