Skip to content

Commit 400aec8

Browse files
Fix previous commit
1 parent 33d238c commit 400aec8

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed

apps/website/pages/_app.tsx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ReactElement, ReactNode, useEffect, useMemo, useState } from "react";
1+
import { ReactElement, ReactNode, useMemo, useState } from "react";
22
import type { NextPage } from "next";
33
import type { AppProps } from "next/app";
44
import Head from "next/head";
@@ -47,23 +47,6 @@ export default function App({ Component, pageProps, emotionCache = clientSideEmo
4747
return pathToBeMatched ? desiredPaths.includes(pathToBeMatched) : false;
4848
};
4949

50-
const router = useRouter();
51-
52-
useEffect(() => {
53-
const handleRouteChange = () => {
54-
const el = document.getElementById("MainScroll");
55-
if (el) el.scrollTo(0, 0);
56-
};
57-
58-
router.events.on("routeChangeComplete", handleRouteChange);
59-
router.events.on("hashChangeComplete", handleRouteChange);
60-
61-
return () => {
62-
router.events.off("routeChangeComplete", handleRouteChange);
63-
router.events.off("hashChangeComplete", handleRouteChange);
64-
};
65-
}, [router.events]);
66-
6750
return (
6851
<CacheProvider value={emotionCache}>
6952
<Head>

apps/website/screens/common/MainContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const MainContent = ({ children }: { children: ReactNode }) => {
6565
}
6666
}, [latestRelease, toast]);
6767

68-
return <MainContainer id="hello">{children}</MainContainer>;
68+
return <MainContainer>{children}</MainContainer>;
6969
};
7070

7171
export default MainContent;

packages/lib/src/layout/ApplicationLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ const DxcApplicationLayout = ({
167167
<SidenavContainer>{sidenav}</SidenavContainer>
168168
)}
169169
</SidenavContextProvider>
170-
<MainContainer id="MainScroll">
170+
<MainContainer>
171171
<MainContentContainer>
172172
{findChildType(children, Main)}
173173
<FooterContainer>

0 commit comments

Comments
 (0)