Toasts working
This commit is contained in:
@@ -2,6 +2,7 @@ import { useLocalStorage } from '@mantine/hooks';
|
||||
import { appTheme } from 'contexts';
|
||||
import { useAtom } from 'jotai';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { toast } from 'react-toastify';
|
||||
import { useQueryAPI, useWeatherAPI } from './useAPI';
|
||||
|
||||
export function useCommonHooks() {
|
||||
@@ -95,6 +96,8 @@ export function useCommonHooks() {
|
||||
|
||||
const [applicationData, setApplicationData] = useState<any>([]);
|
||||
|
||||
const notify = (notification: any) => toast(notification, { position: 'bottom-right' });
|
||||
|
||||
useEffect(() => {
|
||||
if (apps && !isAppsFetching) {
|
||||
setApplicationData(apps);
|
||||
@@ -200,5 +203,6 @@ export function useCommonHooks() {
|
||||
personalIsFetched,
|
||||
personalIsFetching,
|
||||
personalIsLoading,
|
||||
notify,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user