|
|
@@ -3,17 +3,17 @@ import { useState, useCallback } from 'react';
|
|
|
import { PayMethodType } from '@/defines';
|
|
|
|
|
|
export interface UseActionReturn {
|
|
|
- selectedPlanId: number | null;
|
|
|
- handlePlanClick: (planId: number) => void;
|
|
|
+ selectedPlanId: string | null;
|
|
|
+ handlePlanClick: (planId: string) => void;
|
|
|
selectedPayMethod: PayMethodType | null;
|
|
|
handlePayMethodClick: (payMethodId: PayMethodType) => void;
|
|
|
}
|
|
|
|
|
|
export function useAction(): UseActionReturn {
|
|
|
- const [selectedPlanId, setSelectedPlanId] = useState<number | null>(null);
|
|
|
+ const [selectedPlanId, setSelectedPlanId] = useState<string | null>(null);
|
|
|
const [selectedPayMethod, setSelectedPayMethod] = useState<PayMethodType | null>(null);
|
|
|
|
|
|
- const handlePlanClick = useCallback((planId: number) => {
|
|
|
+ const handlePlanClick = useCallback((planId: string) => {
|
|
|
setSelectedPlanId(planId);
|
|
|
}, []);
|
|
|
|