스낵바 기능 추가, 현금영수증 날짜 변경 추가
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
import { toast } from "react-toastify";
|
||||
|
||||
export const snackBar = (text: string) => {
|
||||
export const snackBar = (text: string, callback?: () => void) => {
|
||||
toast.dismiss({ containerId: 'snackbar' });
|
||||
toast(text, { containerId: 'snackbar' });
|
||||
if(!!callback && typeof(callback) === 'function'){
|
||||
setTimeout(() => {
|
||||
callback();
|
||||
}, 3000);
|
||||
}
|
||||
};
|
||||
|
||||
export const notiBar = (text: string) => {
|
||||
export const notiBar = (text: string, callback?: () => void) => {
|
||||
toast.dismiss({ containerId: 'notibar' });
|
||||
toast(text, { containerId: 'notibar' });
|
||||
if(!!callback && typeof(callback) === 'function'){
|
||||
setTimeout(() => {
|
||||
callback();
|
||||
}, 3000);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user