Remove payment methods
Removes the hardcoded payment methods from the payment methods page.
This commit is contained in:
@@ -6,45 +6,6 @@ import { useNavigate } from 'react-router-dom';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { useToast } from '@/hooks/use-toast';
|
||||
|
||||
const PaymentMethodCard = ({
|
||||
type,
|
||||
label,
|
||||
lastDigits,
|
||||
expiry,
|
||||
isDefault
|
||||
}: {
|
||||
type: 'card' | 'bank',
|
||||
label: string,
|
||||
lastDigits: string,
|
||||
expiry?: string,
|
||||
isDefault?: boolean
|
||||
}) => {
|
||||
return (
|
||||
<div className="neuro-flat p-4 mb-4">
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="neuro-pressed p-2 rounded-full text-neuro-income">
|
||||
<CreditCard size={20} />
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="font-medium">{label}</h3>
|
||||
<p className="text-sm text-gray-500">
|
||||
{type === 'card' ? '•••• •••• •••• ' : ''}
|
||||
{lastDigits}
|
||||
{expiry ? ` · ${expiry}` : ''}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{isDefault && (
|
||||
<span className="text-xs bg-neuro-income/10 text-neuro-income px-2 py-1 rounded-full">
|
||||
기본
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const PaymentMethods = () => {
|
||||
const navigate = useNavigate();
|
||||
const { toast } = useToast();
|
||||
@@ -74,24 +35,17 @@ const PaymentMethods = () => {
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{/* Payment Methods List */}
|
||||
<div className="mb-8">
|
||||
<h2 className="text-sm font-medium text-gray-500 mb-4 px-2">신용카드</h2>
|
||||
|
||||
<PaymentMethodCard
|
||||
type="card"
|
||||
label="신한카드"
|
||||
lastDigits="1234"
|
||||
expiry="12/25"
|
||||
isDefault
|
||||
/>
|
||||
|
||||
<PaymentMethodCard
|
||||
type="card"
|
||||
label="국민카드"
|
||||
lastDigits="5678"
|
||||
expiry="09/26"
|
||||
/>
|
||||
{/* 등록된 결제 수단이 없습니다 메시지 */}
|
||||
<div className="neuro-flat p-6 mb-6 text-center">
|
||||
<div className="flex flex-col items-center">
|
||||
<div className="neuro-pressed p-3 rounded-full text-gray-400 mb-4">
|
||||
<CreditCard size={24} />
|
||||
</div>
|
||||
<h3 className="font-medium mb-2">등록된 결제 수단이 없습니다</h3>
|
||||
<p className="text-sm text-gray-500">
|
||||
새로운 결제 수단을 추가해 보세요
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Notice */}
|
||||
|
||||
Reference in New Issue
Block a user