chore: move getPageMeta from app-state-provider to page-helper

This commit is contained in:
QiShaoXuan
2022-12-21 12:39:05 +08:00
parent 3be9dbd4a4
commit cb805a07ff
5 changed files with 18 additions and 20 deletions
+4 -2
View File
@@ -52,7 +52,10 @@ export type ToastOptions = {
* toast('Hello World');
* ```
*/
export const toast = (message: string, { duration = 2500 }: ToastOptions) => {
export const toast = (
message: string,
{ duration }: ToastOptions = { duration: 2500 }
) => {
if (!ToastContainer) {
ToastContainer = createToastContainer();
}
@@ -105,5 +108,4 @@ export const toast = (message: string, { duration = 2500 }: ToastOptions) => {
return element;
};
export default toast;