Problem refrencing

This commit is contained in:
2026-02-07 22:06:08 +01:00
parent 06aabf7f8c
commit a98a481aa4
5 changed files with 33 additions and 18 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import { useEffect, useState } from "react";
export default function useAction<T>(
action: () => Promise<T>,
dependencies = [],
dependencies: any[] = [],
): [T | null, boolean, Error | null] {
const [value, setValue] = useState<T | null>(null);
const [loaded, setLoaded] = useState(false);
@@ -21,7 +21,7 @@ export default function useAction<T>(
export function useActionInterval<T>(
action: () => Promise<T>,
interval: number,
dependencies = [],
dependencies: any[] = [],
): [T | null, boolean, Error | null] {
const [value, setValue] = useState<T | null>(null);
const [loaded, setLoaded] = useState(false);