import { Request , Response } from "@architect/shared/architect-types" ; import { isLoggedIn } from "@architect/shared/utils" ; import { webAppResponse } from "@architect/views/page-layout" ; import redirect from "@architect/shared/redirect" ; import config from "@architect/shared/config" ; export async function handler ( request ) { if ( isLoggedIn ( request ) ) { return redirect ( config . loginRedirectURL ) ; } return webAppResponse ; }