Skip to content

Commit c75fd71

Browse files
committed
fix: SHARE 타입 지출 수정/삭제 버튼 숨김 처리
1 parent 75e4ebf commit c75fd71

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/components/expenses/ExpenseModal.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ interface ExpenseModalProps {
1414
}
1515

1616
const ExpenseModal: React.FC<ExpenseModalProps> = ({expense, onClose}) => {
17+
// console.log('expense 객체: ', expense?.expenseType, expense);
18+
1719
const {addExpense, updateExpense, deleteExpense, mode, currentGroup} = useAppStore();
1820
const {user} = useAuthStore();
1921
const [isSubmitting, setIsSubmitting] = useState(false);
@@ -652,7 +654,7 @@ const ExpenseModal: React.FC<ExpenseModalProps> = ({expense, onClose}) => {
652654

653655
{/* Buttons */}
654656
<div className="flex space-x-3 pt-4">
655-
{expense && !expense.isGroupShare && (
657+
{expense && expense.expenseType !== 'SHARE' && (
656658
<motion.button
657659
type="button"
658660
className={`px-4 py-2 border border-red-300 text-red-700 rounded-lg font-medium transition-colors ${
@@ -677,7 +679,7 @@ const ExpenseModal: React.FC<ExpenseModalProps> = ({expense, onClose}) => {
677679
</motion.button>
678680
)}
679681

680-
{!expense?.isGroupShare && (
682+
{expense?.expenseType !== 'SHARE' && (
681683
<motion.button
682684
type="submit"
683685
className={`flex-1 px-4 py-2 bg-accent-500 text-white rounded-lg font-medium transition-colors ${

0 commit comments

Comments
 (0)