enable login

This commit is contained in:
Abi Raja 2023-12-15 12:36:15 -05:00
parent 0f16c1d8a2
commit dcb0116c06

View File

@ -3,7 +3,7 @@ import App from "../../App";
import { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
import { AlertDialog } from "@radix-ui/react-alert-dialog"; import { AlertDialog } from "@radix-ui/react-alert-dialog";
import { AlertDialogContent } from "../ui/alert-dialog"; import { AlertDialogContent } from "../ui/alert-dialog";
// import FullPageSpinner from "../custom-ui/FullPageSpinner"; import FullPageSpinner from "../custom-ui/FullPageSpinner";
import { useAuthenticatedFetch } from "./useAuthenticatedFetch"; import { useAuthenticatedFetch } from "./useAuthenticatedFetch";
function AppContainer() { function AppContainer() {
@ -17,8 +17,7 @@ function AppContainer() {
// If Clerk is loaded and the user is not signed in, show the sign up popup // If Clerk is loaded and the user is not signed in, show the sign up popup
useEffect(() => { useEffect(() => {
if (isLoaded && !isSignedIn) { if (isLoaded && !isSignedIn) {
// setShowPopup(true); setShowPopup(true);
setShowPopup(false);
} }
}, [isSignedIn, isLoaded]); }, [isSignedIn, isLoaded]);
@ -31,8 +30,8 @@ function AppContainer() {
isInitRequestInProgress.current = true; isInitRequestInProgress.current = true;
const user = await authenticatedFetch( const user = await authenticatedFetch(
// "https://screenshot-to-code-saas.onrender.com/users/create", "https://screenshot-to-code-saas.onrender.com/users/create",
"http://localhost:8001/users/create", // "http://localhost:8001/users/create",
"POST" "POST"
); );
console.log(user); console.log(user);
@ -44,7 +43,7 @@ function AppContainer() {
}, []); }, []);
// If Clerk is still loading, show a spinner // If Clerk is still loading, show a spinner
// if (!isLoaded) return <FullPageSpinner />; if (!isLoaded) return <FullPageSpinner />;
return ( return (
<> <>