Skip to content

Commit

Permalink
fix: avoid creating new client on refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelgautier committed Jun 11, 2024
1 parent 87e5aa4 commit 27670e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/client/[client]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 27670e2

Please sign in to comment.