Skip to content

Commit 65bf2ad

Browse files
Bruno RodriguesBruno Rodrigues
authored andcommitted
feat: update deprecated phosphor icons names
1 parent 5ef8dfa commit 65bf2ad

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

src/blocks/ContactFormBlock/index.tsx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
import { CircleNotch, PaperPlaneTilt, XCircle } from '@phosphor-icons/react';
1+
import {
2+
CheckCircleIcon,
3+
CircleNotchIcon,
4+
PaperPlaneTiltIcon,
5+
XCircleIcon
6+
} from '@phosphor-icons/react';
27
import { useForm } from '@tanstack/react-form';
38
import { useSendEmail } from '@services/email/hooks/useSendEmail';
49
import z from 'zod';
510
import { toast } from 'sonner';
6-
import { CheckCircle } from '@phosphor-icons/react/dist/ssr';
711

812
const 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>

0 commit comments

Comments
 (0)