Skip to content

Commit 9f8b978

Browse files
committed
Scroll to top
1 parent 8581002 commit 9f8b978

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

components/SVG/SVGMobileSearchIcon.component.jsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,20 @@ const SVGMobileSearchIcon = () => {
2929
<div className="inline mr-2 md:hidden xl:hidden">
3030
<svg
3131
className="cursor-pointer"
32+
33+
3234
onClick={() => {
33-
setisExpanded(!isExpanded);
35+
window.scrollTo({
36+
top: 0,
37+
behavior: 'smooth',
38+
});
39+
3440
}}
41+
42+
43+
/*onClick={() => {
44+
setisExpanded(!isExpanded);
45+
}}*/
3546
fill="#fff"
3647
xmlns="https://www.w3.org/2000/svg"
3748
viewBox="0 0 50 50"

0 commit comments

Comments
 (0)