Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
Tymmmy committed Sep 17, 2024
1 parent ad89b0a commit 7596cf5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@ import { useDialog } from '@/lib/hooks/useDialog'
import { useZodForm } from '@/lib/hooks/useZodForm'
import { Form } from '@/ui/forms/Form'
import { UserCardFront } from '../userCards/UserCard'
import { activateCardSchema, cardServiceMock } from '@/lib/api/card'
import { activateCardSchema, cardServiceMock, IUserCard } from '@/lib/api/card'
import { useToast } from '@/lib/hooks/useToast'
import { Card } from '../icons/CardButtons'

type ActivateCardDialogProps = Pick<DialogProps, 'onClose'>
type ActivateCardDialogProps = Pick<DialogProps, 'onClose'> & {
card: IUserCard
}

export const ActivateCardDialog = ({ onClose }: ActivateCardDialogProps) => {
export const ActivateCardDialog = ({
card,
onClose
}: ActivateCardDialogProps) => {
const [, closeDialog] = useDialog()
const { toast } = useToast()
const activateCardForm = useZodForm({
Expand Down Expand Up @@ -86,7 +91,7 @@ export const ActivateCardDialog = ({ onClose }: ActivateCardDialogProps) => {
}}
>
<div className="flex flex-col items-center justify-center gap-2">
<UserCardFront />
<UserCardFront card={card} />
Proceed with activation only if you have received the
card, as it will be fully functional and payment ready.
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import { useRouter } from 'next/router'
import { getObjectKeys } from '@/utils/helpers'
import { Input } from '@/ui/forms/Input'

type UserCardPINDialogProos = Pick<DialogProps, 'onClose'> & {
type UserCardPINDialogProps = Pick<DialogProps, 'onClose'> & {
card: IUserCard
}

export const UserCardPINDialog = ({
card,
onClose
}: UserCardPINDialogProos) => {
}: UserCardPINDialogProps) => {
return (
<Transition.Root show={true} as={Fragment} appear={true}>
<Dialog as="div" className="relative z-10" onClose={onClose}>
Expand Down

0 comments on commit 7596cf5

Please sign in to comment.