From f56fc0be86552bff36fd38a9474292723b8c7c22 Mon Sep 17 00:00:00 2001 From: swimmingRiver Date: Fri, 4 Jul 2025 17:37:42 +0900 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20users=20type=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/supabase/database.types.ts | 41 +++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/src/lib/supabase/database.types.ts b/src/lib/supabase/database.types.ts index 685d95a2..a5cb0e0c 100644 --- a/src/lib/supabase/database.types.ts +++ b/src/lib/supabase/database.types.ts @@ -1,4 +1,4 @@ -export type Json = +export type Json = | string | number | boolean @@ -101,7 +101,7 @@ export type Database = { Row: { approval_period: number | null; approved_count: number; - capacity: number | null; + capacity: number; cover_image_url: string | null; created_at: string; genre: string; @@ -116,7 +116,7 @@ export type Database = { Insert: { approval_period?: number | null; approved_count: number; - capacity?: number | null; + capacity: number; cover_image_url?: string | null; created_at?: string; genre: string; @@ -131,7 +131,7 @@ export type Database = { Update: { approval_period?: number | null; approved_count?: number; - capacity?: number | null; + capacity?: number; cover_image_url?: string | null; created_at?: string; genre?: string; @@ -209,6 +209,39 @@ export type Database = { }, ]; }; + users: { + Row: { + created_at: string; + email: string; + favorite: string; + id: number; + image: string | null; + last_seen_at: string | null; + name: string; + updated_at: string | null; + }; + Insert: { + created_at?: string; + email: string; + favorite: string; + id?: number; + image?: string | null; + last_seen_at?: string | null; + name: string; + updated_at?: string | null; + }; + Update: { + created_at?: string; + email?: string; + favorite?: string; + id?: number; + image?: string | null; + last_seen_at?: string | null; + name?: string; + updated_at?: string | null; + }; + Relationships: []; + }; }; Views: { [_ in never]: never; From ecab3817700b04d2ac8ae1ef4174e2369251f3f8 Mon Sep 17 00:00:00 2001 From: swimmingRiver Date: Sun, 6 Jul 2025 06:29:16 +0900 Subject: [PATCH 2/6] =?UTF-8?q?feat:=20=ED=9A=8C=EC=9B=90=EA=B0=80?= =?UTF-8?q?=EC=9E=85=20=EC=9A=94=EC=B2=AD=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/auth/type.ts | 2 +- .../auths/signup/_components/SignupForm.tsx | 12 ++++----- src/hooks/api/auth/useCreateUser.ts | 2 +- src/hooks/api/auth/useSignUpForm.ts | 2 +- src/lib/supabase/repositories/users.ts | 25 +++++++++++++++++++ 5 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 src/lib/supabase/repositories/users.ts diff --git a/src/api/auth/type.ts b/src/api/auth/type.ts index 87803998..98695c41 100644 --- a/src/api/auth/type.ts +++ b/src/api/auth/type.ts @@ -3,7 +3,7 @@ export interface SignUpFormData { email: string; password: string; passwordCheck: string; - companyName: string; + favorite: string; } export type SignUpRequest = Omit; diff --git a/src/app/auths/signup/_components/SignupForm.tsx b/src/app/auths/signup/_components/SignupForm.tsx index ce88aa06..ac7daae2 100644 --- a/src/app/auths/signup/_components/SignupForm.tsx +++ b/src/app/auths/signup/_components/SignupForm.tsx @@ -117,16 +117,16 @@ const SignupForm = () => { signUpValidate({ value, name: 'companyName' }), + ...register('favorite', { + validate: (value) => signUpValidate({ value, name: 'favorite' }), }), }} - hasError={!!errors.companyName} - helperText={errors.companyName?.message} + hasError={!!errors.favorite} + helperText={errors.favorite?.message} />