Skip to content

Commit 3dd00fc

Browse files
committed
chore: change toast package
1 parent 2cb65f0 commit 3dd00fc

File tree

8 files changed

+31
-23
lines changed

8 files changed

+31
-23
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
"react-countdown": "^2.3.5",
3636
"react-dom": "^18",
3737
"react-hook-form": "^7.51.3",
38+
"react-hot-toast": "^2.4.1",
3839
"react-otp-input": "^3.1.1",
3940
"react-swipeable-views": "^0.14.0",
40-
"react-toastify": "^10.0.5",
4141
"sharp": "^0.33.5",
4242
"stylis": "^4.3.1",
4343
"stylis-plugin-rtl": "^2.1.1",

src/app/[locale]/(auth)/account/signin/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { signIn } from 'next-auth/react';
1212
import { useTranslations } from 'next-intl';
1313
import { useTransition } from 'react';
1414
import { Controller, SubmitHandler, useForm } from 'react-hook-form';
15-
import { toast } from 'react-toastify';
15+
import { toast } from 'react-hot-toast';
1616
import * as yup from 'yup';
1717
import { Link as MuiLink } from '@mui/material';
1818

src/app/[locale]/(auth)/account/signup/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { signIn } from 'next-auth/react';
1414
import { useTranslations } from 'next-intl';
1515
import { useTransition } from 'react';
1616
import { Controller, SubmitHandler, useForm } from 'react-hook-form';
17-
import { toast } from 'react-toastify';
17+
import { toast } from 'react-hot-toast';
1818
import * as yup from 'yup';
1919

2020
type FieldNames = Partial<

src/app/[locale]/layout.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,15 @@ import type { Metadata } from 'next';
1717
import { headers } from 'next/headers';
1818
import { userAgent } from 'next/server';
1919
import { PropsWithChildren } from 'react';
20-
import { ToastContainer } from 'react-toastify';
2120
import ConfirmAlertProvider from '@/providers/ConfirmAlertProvider';
22-
import 'react-toastify/dist/ReactToastify.css';
2321

2422
import 'swiper/css';
2523
import 'swiper/css/navigation';
2624
import 'swiper/css/pagination';
2725
import IconsSymbols from '@/components/Icons/components/IconsSymbols';
2826
import { getServerSession } from 'next-auth';
2927
import SessionProvider from '@/components/Auth/SessionProvider';
28+
import { Toaster } from 'react-hot-toast';
3029

3130
export type LocaleLayoutParams = { params: { locale: Locale } };
3231

@@ -69,8 +68,8 @@ export default async function LocaleLayout({
6968
<SessionProvider session={session}>
7069
<AppRouterCacheProvider>
7170
<ThemeProvider theme={themes[locale] ?? defaultTheme}>
72-
<ToastContainer
73-
rtl={languages?.[locale]?.direction == 'rtl'}
71+
<Toaster
72+
// rtl={languages?.[locale]?.direction == 'rtl'}
7473
position="top-center"
7574
/>
7675
<ApolloProvider>

src/components/Header/components/MobileHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ArrowBack, Search, Share } from '@mui/icons-material';
55
import { Box, BoxProps, IconButton, Stack, Typography } from '@mui/material';
66
import { useTranslations } from 'next-intl';
77
import { FC } from 'react';
8-
import { toast } from 'react-toastify';
8+
import { toast } from 'react-hot-toast';
99

1010
export interface MobileHeaderProps extends BoxProps {
1111
title?: string;

src/graphql/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { onError } from '@apollo/client/link/error';
22
import { Observable } from '@apollo/client/utilities';
3-
import { toast } from 'react-toastify';
3+
import { toast } from 'react-hot-toast';
44

55
export const createErrorLink = () => {
66
return onError(({ graphQLErrors, operation, forward }) => {

src/hooks/useAddOrUpdateCartItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from '@/graphql/types/graphql';
1111
import { useMutation } from '@apollo/client';
1212
import useCartUtils from './useCartUtils';
13-
import { toast } from 'react-toastify';
13+
import { toast } from 'react-hot-toast';
1414
import { useTranslations } from 'next-intl';
1515

1616
export interface MutateCartFunction {

yarn.lock

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6134,6 +6134,15 @@ __metadata:
61346134
languageName: node
61356135
linkType: hard
61366136

6137+
"goober@npm:^2.1.10":
6138+
version: 2.1.16
6139+
resolution: "goober@npm:2.1.16"
6140+
peerDependencies:
6141+
csstype: ^3.0.10
6142+
checksum: 10c0/f4c8256bf9c27873d47c1443f348779ac7f322516cb80a5dc647a6ebe790ce6bb9d3f487a0fb8be0b583fb96b9b2f6b7463f7fea3cd680306f95fa6fc9db1f6a
6143+
languageName: node
6144+
linkType: hard
6145+
61376146
"gopd@npm:^1.0.1":
61386147
version: 1.0.1
61396148
resolution: "gopd@npm:1.0.1"
@@ -8559,9 +8568,9 @@ __metadata:
85598568
react-countdown: "npm:^2.3.5"
85608569
react-dom: "npm:^18"
85618570
react-hook-form: "npm:^7.51.3"
8571+
react-hot-toast: "npm:^2.4.1"
85628572
react-otp-input: "npm:^3.1.1"
85638573
react-swipeable-views: "npm:^0.14.0"
8564-
react-toastify: "npm:^10.0.5"
85658574
sharp: "npm:^0.33.5"
85668575
stylis: "npm:^4.3.1"
85678576
stylis-plugin-rtl: "npm:^2.1.1"
@@ -9546,6 +9555,18 @@ __metadata:
95469555
languageName: node
95479556
linkType: hard
95489557

9558+
"react-hot-toast@npm:^2.4.1":
9559+
version: 2.4.1
9560+
resolution: "react-hot-toast@npm:2.4.1"
9561+
dependencies:
9562+
goober: "npm:^2.1.10"
9563+
peerDependencies:
9564+
react: ">=16"
9565+
react-dom: ">=16"
9566+
checksum: 10c0/591ecec3c6adc1cdb70f00165a57baa3d7f75d0d30fa767213c36496bdcc6be2b2e6a3edbf7c04f7d726a1b17dcfb5e7feb2136b04b17c9ccb769894b970f365
9567+
languageName: node
9568+
linkType: hard
9569+
95499570
"react-is@npm:^16.13.1, react-is@npm:^16.7.0":
95509571
version: 16.13.1
95519572
resolution: "react-is@npm:16.13.1"
@@ -9609,18 +9630,6 @@ __metadata:
96099630
languageName: node
96109631
linkType: hard
96119632

9612-
"react-toastify@npm:^10.0.5":
9613-
version: 10.0.5
9614-
resolution: "react-toastify@npm:10.0.5"
9615-
dependencies:
9616-
clsx: "npm:^2.1.0"
9617-
peerDependencies:
9618-
react: ">=18"
9619-
react-dom: ">=18"
9620-
checksum: 10c0/66c68ec3d6c017d9f32652d73bb925224921c6a80b629b9d481430d5b4fd504abb7a99995a64b9aef0fc31326c74f3cbe088b3287b978dd0c355079c4bbf4158
9621-
languageName: node
9622-
linkType: hard
9623-
96249633
"react-transition-group@npm:^4.4.5":
96259634
version: 4.4.5
96269635
resolution: "react-transition-group@npm:4.4.5"

0 commit comments

Comments
 (0)