From 8d885ddf10fc5adaea86926a2295c3820587c9e8 Mon Sep 17 00:00:00 2001 From: Johnson Mao <86179381+JohnsonMao@users.noreply.github.com> Date: Sun, 22 Dec 2024 16:36:29 +0800 Subject: [PATCH] style(marathon): adjust margin and nav text nowrap --- pages/learning-marathon/index.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pages/learning-marathon/index.jsx b/pages/learning-marathon/index.jsx index b823d3d2..0963bf37 100644 --- a/pages/learning-marathon/index.jsx +++ b/pages/learning-marathon/index.jsx @@ -98,8 +98,10 @@ const useScrollPaddingTop = () => { }; handleScrollPaddingTop(); + window.addEventListener('resize', handleScrollPaddingTop); window.addEventListener('storage', handleStorage); return () => { + window.removeEventListener('resize', handleScrollPaddingTop); window.removeEventListener('storage', handleStorage); }; }, []); @@ -224,9 +226,9 @@ const Nav = () => {