From 6c1960f919725508ac47d157cdc259c445802a16 Mon Sep 17 00:00:00 2001 From: iqbalpa Date: Fri, 12 Jul 2024 10:43:24 +0700 Subject: [PATCH] style(watchlist): create toaster for success adding watchlist --- src/modules/detailMovie/detailMovie.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/detailMovie/detailMovie.tsx b/src/modules/detailMovie/detailMovie.tsx index 4621bde..2171259 100644 --- a/src/modules/detailMovie/detailMovie.tsx +++ b/src/modules/detailMovie/detailMovie.tsx @@ -16,6 +16,8 @@ import { RootState } from '@/store/userStore'; import { Plus } from 'lucide-react'; import { addToWatchlist } from '@/api/watchlist.api'; import { getCookie } from 'cookies-next'; +import { toast } from 'react-toastify'; +import 'react-toastify/dist/ReactToastify.css'; interface IDetailMovieModule { id: string; @@ -51,6 +53,7 @@ const DetailMovieModule: React.FC = ({ id }) => { userId: user?.id, }; const res = await addToWatchlist(accessToken, data); + toast.success('Movie added to watchlist'); console.log('added to watchlist'); console.log(res); } catch (e) {