Thích Cốt BấtT
Convex Community10mo ago
2 replies
Thích Cốt Bất

Code generated include {` and `}

//App.tsx
{`import { InventoryDashboard } from "./components/InventoryDashboard";
import { SignInForm } from "./SignInForm";
import { SignOutButton } from "./SignOutButton";
import { useConvexAuth } from "convex/react";

function App() {
  const { isAuthenticated, isLoading } = useConvexAuth();

  if (isLoading) {
    return <div>Loading...</div>;
  }

  return (
    <main>
      {!isAuthenticated ? (
        <SignInForm />
      ) : (
        <div>
          <SignOutButton />
          <InventoryDashboard />
        </div>
      )}
    </main>
  );
}

export default App;`}
Screenshot_2025-04-16_at_10.44.45.png
Was this page helpful?