From 96be7c42f9e6b8e44e3cb18531c46e220e52c0c0 Mon Sep 17 00:00:00 2001 From: Loi Phan Date: Sun, 29 Oct 2023 12:47:55 +0700 Subject: [PATCH] Create toast component and implement to App.tsx --- hotel-management/src/App.tsx | 21 ++---------------- hotel-management/src/components/Toast.tsx | 26 +++++++++++++++++++++++ 2 files changed, 28 insertions(+), 19 deletions(-) create mode 100644 hotel-management/src/components/Toast.tsx diff --git a/hotel-management/src/App.tsx b/hotel-management/src/App.tsx index d7b7b1a..eee378e 100644 --- a/hotel-management/src/App.tsx +++ b/hotel-management/src/App.tsx @@ -1,7 +1,6 @@ import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom'; import isPropValid from '@emotion/is-prop-valid'; import { StyleSheetManager } from 'styled-components'; -import { Toaster } from 'react-hot-toast'; // Components import AppLayout from './components/AppLayout'; @@ -12,6 +11,7 @@ import NotFound from './pages/NotFound'; // Constants import * as PATH from './constants/path'; +import Toast from './components/Toast'; function App() { return ( @@ -30,24 +30,7 @@ function App() { - + ); } diff --git a/hotel-management/src/components/Toast.tsx b/hotel-management/src/components/Toast.tsx new file mode 100644 index 0000000..98c823c --- /dev/null +++ b/hotel-management/src/components/Toast.tsx @@ -0,0 +1,26 @@ +import { Toaster } from 'react-hot-toast'; + +const Toast = () => { + return ( + + ); +}; + +export default Toast;