From 1faa03be890685ca25b50b81a75f03c4576084d9 Mon Sep 17 00:00:00 2001 From: seung365 Date: Thu, 8 Aug 2024 04:12:50 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=97=A4=EB=8D=94=20navigate=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Layout/Header/HeaderWithout.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Layout/Header/HeaderWithout.tsx b/src/components/Layout/Header/HeaderWithout.tsx index 12643ee..38d9c67 100644 --- a/src/components/Layout/Header/HeaderWithout.tsx +++ b/src/components/Layout/Header/HeaderWithout.tsx @@ -1,5 +1,5 @@ import styled from '@emotion/styled'; -import { Link } from 'react-router-dom'; +import { Link, useNavigate } from 'react-router-dom'; import { Button } from '@chakra-ui/react'; import { breakpoints } from '@/styles/variants'; import { useMail } from '@/Provider/MailContext'; @@ -13,6 +13,7 @@ export const Header = () => { throw new Error('MailContext not found'); } const { handleMail } = mailContext; + const navigate = useNavigate(); const handleMailInput = () => { handleMail({ @@ -23,6 +24,7 @@ export const Header = () => { subject: '', receiver: '', }); + navigate(RouterPath.mail); }; const { authInfo } = useAuth(); @@ -46,9 +48,7 @@ export const Header = () => {
- - AI 메일 생성하기 - + AI 메일 생성하기