Fix: Resolve Toast Type Error
The toast function was updated to correctly pass the 'id' property, resolving the TypeScript error.
This commit is contained in:
@@ -5,7 +5,7 @@ import { useNavigate } from 'react-router-dom';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Switch } from '@/components/ui/switch';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { useToast } from '@/hooks/use-toast';
|
||||
import { useToast } from '@/hooks/useToast.wrapper';
|
||||
|
||||
type NotificationSetting = {
|
||||
id: string;
|
||||
|
||||
@@ -3,18 +3,19 @@ import NavBar from '@/components/NavBar';
|
||||
import { ArrowLeft, CreditCard, PlusCircle } from 'lucide-react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { useToast } from '@/hooks/use-toast';
|
||||
import { useToast } from '@/hooks/useToast.wrapper';
|
||||
|
||||
const PaymentMethods = () => {
|
||||
const navigate = useNavigate();
|
||||
const {
|
||||
toast
|
||||
} = useToast();
|
||||
const { toast } = useToast();
|
||||
|
||||
const handleAddPayment = () => {
|
||||
toast({
|
||||
title: "알림",
|
||||
description: "이 결제 기능은 아직 지원하지 않습니다."
|
||||
});
|
||||
};
|
||||
|
||||
return <div className="min-h-screen bg-neuro-background pb-24">
|
||||
<div className="max-w-md mx-auto px-6">
|
||||
{/* Header */}
|
||||
@@ -57,4 +58,5 @@ const PaymentMethods = () => {
|
||||
<NavBar />
|
||||
</div>;
|
||||
};
|
||||
export default PaymentMethods;
|
||||
|
||||
export default PaymentMethods;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import React from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import NavBar from '@/components/NavBar';
|
||||
@@ -6,7 +5,7 @@ import SyncSettings from '@/components/SyncSettings';
|
||||
import { User, CreditCard, Bell, Lock, HelpCircle, LogOut, ChevronRight } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useAuth } from '@/contexts/auth';
|
||||
import { useToast } from '@/hooks/use-toast';
|
||||
import { useToast } from '@/hooks/useToast.wrapper';
|
||||
|
||||
const SettingsOption = ({
|
||||
icon: Icon,
|
||||
|
||||
Reference in New Issue
Block a user