
import React from "react";
import Register from './register'
import { redirect } from "next/navigation";
import {checkIsAuthenticated} from '../../lib/checkIsAuthenticated'

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

export default SignUpPage;
