mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-04-30 18:59:37 +00:00
General Updates
This commit is contained in:
parent
d4586b1fa5
commit
beb661143b
4 changed files with 12 additions and 7 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
import Image from 'next/image';
|
||||
import { toast } from 'sonner';
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
import { Dialog, DialogContent } from '@/components/ui/dialog';
|
||||
import { useProModal } from '@/hooks/use-pro-modal';
|
||||
|
@ -11,10 +12,11 @@ import { stripeRedirect } from '@/actions/stripe-redirect';
|
|||
|
||||
export const ProModal = () => {
|
||||
const proModal = useProModal();
|
||||
const router = useRouter();
|
||||
|
||||
const { execute, isLoading } = useAction(stripeRedirect, {
|
||||
onSuccess: (data) => {
|
||||
window.location.href = data;
|
||||
router.push(data);
|
||||
},
|
||||
onError: (error) => {
|
||||
toast.error(error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue