From a30a547ac5596c787252ce23a845093c426dc2ef Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Tue, 5 Apr 2022 12:16:09 -0300
Subject: mui alert and not enough blanance ported to material

---
 packages/taler-wallet-webextension/src/stories.tsx | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'packages/taler-wallet-webextension/src/stories.tsx')

diff --git a/packages/taler-wallet-webextension/src/stories.tsx b/packages/taler-wallet-webextension/src/stories.tsx
index 3dcaa7fb9..b7e9b4184 100644
--- a/packages/taler-wallet-webextension/src/stories.tsx
+++ b/packages/taler-wallet-webextension/src/stories.tsx
@@ -286,12 +286,19 @@ function Application(): VNode {
     initialSelection,
   );
 
-  function updateSelectedFromHashChange({ newURL, oldURL }: any): void {
+  function updateSelectedFromHashChange(): void {
     const selected = getSelectionFromLocationHash();
     updateSelected(selected);
   }
   useEffect(() => {
     window.addEventListener("hashchange", updateSelectedFromHashChange);
+    if (location.hash) {
+      const hash = location.hash.substring(1);
+      const found = document.getElementById(hash);
+      if (found) {
+        found.scrollIntoView();
+      }
+    }
     return () => {
       window.removeEventListener("hashchange", updateSelectedFromHashChange);
     };
-- 
cgit v1.2.3

