fix: dead loop
This commit is contained in:
parent
4923aff184
commit
9c06bac91b
@ -31,10 +31,8 @@ export const PushyProvider = ({
|
|||||||
const [lastError, setLastError] = useState<Error>();
|
const [lastError, setLastError] = useState<Error>();
|
||||||
|
|
||||||
const dismissError = useCallback(() => {
|
const dismissError = useCallback(() => {
|
||||||
if (lastError) {
|
setLastError(undefined);
|
||||||
setLastError(undefined);
|
}, []);
|
||||||
}
|
|
||||||
}, [lastError]);
|
|
||||||
|
|
||||||
const showAlert = useCallback(
|
const showAlert = useCallback(
|
||||||
(...args: Parameters<typeof Alert.alert>) => {
|
(...args: Parameters<typeof Alert.alert>) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user