We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e8447a commit bde7b60Copy full SHA for bde7b60
beta/src/pages/_app.tsx
@@ -25,6 +25,15 @@ if (typeof window !== 'undefined') {
25
26
export default function MyApp({Component, pageProps}: AppProps) {
27
const router = useRouter();
28
+
29
+ React.useEffect(() => {
30
+ // This is kind of a lie.
31
+ // We still rely on the manual Next.js scrollRestoration logic.
32
+ // However, we *also* don't want Safari grey screen during the back swipe gesture.
33
+ // Seems like it doesn't hurt to enable auto restore *and* Next.js logic at the same time.
34
+ history.scrollRestoration = 'auto';
35
+ }, []);
36
37
React.useEffect(() => {
38
const handleRouteChange = (url: string) => {
39
ga('set', 'page', url);
0 commit comments