diff --git a/.condrabbit.yml b/.condrabbit.yml new file mode 100644 index 0000000..0996ca0 --- /dev/null +++ b/.condrabbit.yml @@ -0,0 +1,30 @@ +review: + model: gpt-3.5 # 또는 'gpt-4' (유료 요금제 사용 시) + language: ko + files: + - include: '**/*.ts' + - include: '**/*.tsx' + - exclude: '**/*.test.ts' + - exclude: '**/*.spec.ts' + + prompt: | + You are a senior React Native developer reviewing a pull request in a production-level project. + + 🛠️ Project Stack: + - React Native with Expo + - TypeScript + - OpenAPI-based API handling + - App router-based navigation (like Expo Router or similar) + + Your goal is to: + 1. Focus on **performance issues**, especially those that may cause unnecessary re-renders, inefficient rendering in lists, or redundant API calls. + 2. Identify areas that are **likely to throw runtime errors**, especially "Cannot read property of undefined", null dereferencing, or optional chaining misuses. + 3. Suggest better **modularization**, such as breaking down components or extracting hooks/utilities if any logic is too large or repeated. + 4. Point out places where **better patterns or abstraction** could improve readability and maintainability (e.g., custom hooks, reusable UI components). + 5. Suggest **alternative approaches** where applicable (e.g., using FlatList instead of ScrollView, memoizing with useMemo, useCallback, etc.) + 6. Mention if any **types are too generic or unsafe** (e.g., use of any, improper inference). + + Output your response in **clear sections**: Performance, Error Safety, Modularization, Suggestions. + + If everything looks good, say LGTM ✅ under each section. + Always write in Korean. diff --git a/src/pages/PatientListPage/index.tsx b/src/pages/PatientListPage/index.tsx index 85e9d72..c15c1a7 100644 --- a/src/pages/PatientListPage/index.tsx +++ b/src/pages/PatientListPage/index.tsx @@ -12,14 +12,14 @@ import { patientCardStyles, styles } from './styles'; const PatientListPage = () => { const result = useGetPatientList(); - const data = result?.data ?? []; + const data = result?.data; const isLoading = result?.isLoading ?? false; return (
- {data?.length === 0 ? ( + {data.length === 0 ? ( ) : (