From ea3deba121ad969cfe435a879c96c494fa570ae3 Mon Sep 17 00:00:00 2001 From: Michael Hunteman Date: Fri, 27 Sep 2024 08:50:56 -0700 Subject: Use app dispatch and selector --- client/src/components/GuestLogin.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/src/components/GuestLogin.tsx') diff --git a/client/src/components/GuestLogin.tsx b/client/src/components/GuestLogin.tsx index 9a9bf8e..d0270cb 100644 --- a/client/src/components/GuestLogin.tsx +++ b/client/src/components/GuestLogin.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { useNavigate } from 'react-router-dom'; -import { useDispatch } from 'react-redux'; import { Button, Paper, TextField, Typography } from '@mui/material'; import { useForm } from 'react-hook-form'; +import { useAppDispatch } from '../hooks'; import { setGuest } from '../slices/auth/guestSlice'; import { useLoginGuestMutation } from '../slices/api/guestSlice'; import { showSnackbar } from '../slices/snackbarSlice'; @@ -11,7 +11,7 @@ import type { Data } from '../error'; import type { Name } from '../models'; function GuestLogin() { - const dispatch = useDispatch(); + const dispatch = useAppDispatch(); const navigate = useNavigate(); const [login] = useLoginGuestMutation(); -- cgit v1.2.3