From e482024187c77f919e299e45eeea19ae8dbbf718 Mon Sep 17 00:00:00 2001 From: Nidhi Pawar <69379762+nidhipawar5@users.noreply.github.com> Date: Thu, 9 May 2024 23:52:36 +0530 Subject: [PATCH] Update index.tsx #13653 --- packages/next/src/client/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/next/src/client/index.tsx b/packages/next/src/client/index.tsx index 40686333e753c..e366096376a2c 100644 --- a/packages/next/src/client/index.tsx +++ b/packages/next/src/client/index.tsx @@ -156,7 +156,8 @@ class Container extends React.Component<{ }) } } - + +//Changes to be reviewed - To ensure that the component scrolls to the appropriate element even when the user navigates using the browser buttons componentDidUpdate(prevProps) { if (prevProps.location.hash !== this.props.location.hash) { this.scrollToHash();