File tree Expand file tree Collapse file tree
src/blocks/ContactFormBlock Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { CircleNotch , PaperPlaneTilt , XCircle } from '@phosphor-icons/react' ;
1+ import {
2+ CheckCircleIcon ,
3+ CircleNotchIcon ,
4+ PaperPlaneTiltIcon ,
5+ XCircleIcon
6+ } from '@phosphor-icons/react' ;
27import { useForm } from '@tanstack/react-form' ;
38import { useSendEmail } from '@services/email/hooks/useSendEmail' ;
49import z from 'zod' ;
510import { toast } from 'sonner' ;
6- import { CheckCircle } from '@phosphor-icons/react/dist/ssr' ;
711
812const contactFormSchema = z . object ( {
913 name : z . string ( ) . nonempty ( ) ,
@@ -38,13 +42,13 @@ function ContactFormBlock() {
3842 {
3943 onSuccess : ( ) => {
4044 toast ( 'Email sent successfully' , {
41- icon : < CheckCircle size = { 18 } weight = "fill" />
45+ icon : < CheckCircleIcon size = { 18 } weight = "fill" />
4246 } ) ;
4347 form . reset ( ) ;
4448 } ,
4549 onError : ( err ) => {
4650 toast ( err . message , {
47- icon : < XCircle size = { 18 } weight = "fill" />
51+ icon : < XCircleIcon size = { 18 } weight = "fill" />
4852 } ) ;
4953 }
5054 }
@@ -141,9 +145,13 @@ function ContactFormBlock() {
141145 < button className = "form-submit" type = "submit" >
142146 Send message
143147 { status === 'pending' ? (
144- < CircleNotch size = { 18 } weight = "regular" className = "animate-spin" />
148+ < CircleNotchIcon
149+ size = { 18 }
150+ weight = "regular"
151+ className = "animate-spin"
152+ />
145153 ) : (
146- < PaperPlaneTilt weight = "duotone" />
154+ < PaperPlaneTiltIcon weight = "duotone" />
147155 ) }
148156 </ button >
149157 </ form >
You can’t perform that action at this time.
0 commit comments