Migrate to TanStack Query (React Query) and TanStack Router (#637)

This commit is contained in:
Alejandra
2024-03-07 19:16:23 +01:00
committed by GitHub
parent 7c2b617c09
commit 11c09b50b2
40 changed files with 4967 additions and 658 deletions

View File

@@ -0,0 +1,21 @@
import { useCallback } from 'react';
import { useToast } from '@chakra-ui/react';
const useCustomToast = () => {
const toast = useToast();
const showToast = useCallback((title: string, description: string, status: 'success' | 'error') => {
toast({
title,
description,
status,
isClosable: true,
position: 'bottom-right'
});
}, [toast]);
return showToast;
};
export default useCustomToast;