commit 28904339e1e6c2fd7674d0bab3436684f333a267
parent 629580c0edce300df9f457014ea56aebd000a043
Author: Sebastian <sebasjm@taler-systems.com>
Date: Wed, 22 Jul 2026 16:01:04 -0300
missing dependency: re-render when url change
Diffstat:
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/packages/anastasis-webui/src/pages/home/AddingProviderScreen/views.tsx b/packages/anastasis-webui/src/pages/home/AddingProviderScreen/views.tsx
@@ -196,15 +196,18 @@ function TableRow({
info: AuthenticationProviderStatusOk;
}): VNode {
const [status, setStatus] = useState("checking");
- useEffect(function () {
- testProvider(url.endsWith("/") ? url.substring(0, url.length - 1) : url)
- .then(function () {
- setStatus("responding");
- })
- .catch(function () {
- setStatus("failed to contact");
- });
- });
+ useEffect(
+ function () {
+ testProvider(url.endsWith("/") ? url.substring(0, url.length - 1) : url)
+ .then(function () {
+ setStatus("responding");
+ })
+ .catch(function () {
+ setStatus("failed to contact");
+ });
+ },
+ [url],
+ );
return (
<div
class="box"
@@ -259,15 +262,18 @@ function TableRowError({
info: AuthenticationProviderStatusError;
}): VNode {
const [status, setStatus] = useState("checking");
- useEffect(function () {
- testProvider(url.endsWith("/") ? url.substring(0, url.length - 1) : url)
- .then(function () {
- setStatus("responding");
- })
- .catch(function () {
- setStatus("failed to contact");
- });
- });
+ useEffect(
+ function () {
+ testProvider(url.endsWith("/") ? url.substring(0, url.length - 1) : url)
+ .then(function () {
+ setStatus("responding");
+ })
+ .catch(function () {
+ setStatus("failed to contact");
+ });
+ },
+ [url],
+ );
return (
<div
class="box"