From 27670e2562a2df769921cf3d65fde42d86671576 Mon Sep 17 00:00:00 2001 From: Emmanuel Gautier Date: Wed, 12 Jun 2024 00:25:00 +0200 Subject: [PATCH] fix: avoid creating new client on refresh --- app/client/[client]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/[client]/page.tsx b/app/client/[client]/page.tsx index ffd5de3..5abf362 100644 --- a/app/client/[client]/page.tsx +++ b/app/client/[client]/page.tsx @@ -84,7 +84,7 @@ export default function ClientPage() { }, [client]) useEffect(() => { - if (!client || !searchParams.has('test_id_client') || testIdClient) { + if (!client || !searchParams.has('test_id_client') || localStorage.getItem(localStorageItem(client.id || client.name))) { return }