Investigate table creation API

Explore the possibility of creating tables directly via the Supabase API.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-15 13:05:45 +00:00
parent 4bacba4719
commit a8537d5398
3 changed files with 254 additions and 5 deletions

View File

@@ -4,7 +4,7 @@ import { Link } from "react-router-dom";
import { Label } from "@/components/ui/label";
import { Input } from "@/components/ui/input";
import { Button } from "@/components/ui/button";
import { ArrowRight, Mail, KeyRound, Eye, EyeOff, AlertTriangle } from "lucide-react";
import { ArrowRight, Mail, KeyRound, Eye, EyeOff, AlertTriangle, Loader2 } from "lucide-react";
interface LoginFormProps {
email: string;
@@ -14,6 +14,7 @@ interface LoginFormProps {
showPassword: boolean;
setShowPassword: (show: boolean) => void;
isLoading: boolean;
isSettingUpTables?: boolean;
loginError: string | null;
handleLogin: (e: React.FormEvent) => Promise<void>;
}
@@ -26,6 +27,7 @@ const LoginForm: React.FC<LoginFormProps> = ({
showPassword,
setShowPassword,
isLoading,
isSettingUpTables = false,
loginError,
handleLogin
}) => {
@@ -102,11 +104,14 @@ const LoginForm: React.FC<LoginFormProps> = ({
<Button
type="submit"
disabled={isLoading}
disabled={isLoading || isSettingUpTables}
className="w-full hover:bg-neuro-income/80 text-white py-6 h-auto bg-neuro-income"
>
{isLoading ? "로그인 중..." : "로그인"}
{!isLoading && <ArrowRight className="ml-2 h-5 w-5" />}
{isLoading ? "로그인 중..." :
isSettingUpTables ? "데이터베이스 설정 중..." : "로그인"}
{!isLoading && !isSettingUpTables ?
<ArrowRight className="ml-2 h-5 w-5" /> :
<Loader2 className="ml-2 h-5 w-5 animate-spin" />}
</Button>
</div>
</form>