Update dependency versions

This commit is contained in:
2025-11-13 23:16:16 -05:00
parent ddf25232b4
commit 8567e67d1a
7 changed files with 782 additions and 550 deletions

View File

@@ -24,12 +24,12 @@ export default function ToasterProvider({
const [ toast, setToast ] = useState<Toast[]>([]);
const hideToast = useCallback((id: string) => {
const hideToast = useCallback(function hide(id: string){
setToast((prev) => {
if(prev.length === 1 && prev[0].id === id){
const current = prev[0].hideTime > moment(new Date()).subtract(600, "ms").toDate() ? [...prev] : [];
if(current.length > 0){
setTimeout(() => hideToast(id), 600);
setTimeout(() => hide(id), 600);
}
return current;
}