Toasts working

This commit is contained in:
Sean Edmunds
2025-01-24 15:41:21 -06:00
parent 6b162902fe
commit f2073f951d
8 changed files with 96 additions and 120 deletions

View File

@@ -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,
};
}