Sync from GitHub via hub-sync
Browse files- src/App.tsx +11 -11
src/App.tsx
CHANGED
|
@@ -491,17 +491,17 @@ export default function App() {
|
|
| 491 |
};
|
| 492 |
|
| 493 |
useEffect(() => {
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
|
| 497 |
-
|
| 498 |
-
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
|
| 502 |
-
|
| 503 |
-
|
| 504 |
-
|
| 505 |
|
| 506 |
const onSubmitSearch = (e: React.FormEvent) => {
|
| 507 |
e.preventDefault();
|
|
|
|
| 491 |
};
|
| 492 |
|
| 493 |
useEffect(() => {
|
| 494 |
+
const params = new URLSearchParams(window.location.search);
|
| 495 |
+
const phoneParam = params.get("phone");
|
| 496 |
+
if (phoneParam) {
|
| 497 |
+
const clean = phoneParam.trim();
|
| 498 |
+
setSearchQuery(clean);
|
| 499 |
+
handleSearch(clean);
|
| 500 |
+
}
|
| 501 |
+
// Pas de paramètre "phone" dans l'URL -> aucune recherche automatique,
|
| 502 |
+
// l'agent doit saisir un numéro manuellement.
|
| 503 |
+
}, []);
|
| 504 |
+
|
| 505 |
|
| 506 |
const onSubmitSearch = (e: React.FormEvent) => {
|
| 507 |
e.preventDefault();
|