File tree Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ import './src/env.mjs';
3
3
/**@type {import('next').NextConfig }*/
4
4
const config = {
5
5
reactStrictMode : true ,
6
+ experimental : {
7
+ viewTransition : true
8
+ } ,
6
9
async redirects ( ) {
7
10
return [
8
11
{
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import '@/styles/globals.css';
2
2
import Script from 'next/script' ;
3
3
import type { Metadata , Viewport } from 'next' ;
4
4
import { Space_Grotesk } from 'next/font/google' ;
5
+ import { unstable_ViewTransition as ViewTransition } from 'react' ;
5
6
import { Toaster } from 'react-hot-toast' ;
6
7
import { SessionProvider } from 'next-auth/react' ;
7
8
import { Footer } from '@/components/footer' ;
@@ -19,19 +20,21 @@ export default function RootLayout({ children }: React.PropsWithChildren) {
19
20
return (
20
21
< html className = { spaceGrotesk . variable } >
21
22
< body className = "font-sans font-normal bg-hacktoberfest-dark-green" >
22
- { children }
23
- < Footer />
24
- < SessionProvider >
25
- < ReportModal />
26
- </ SessionProvider >
27
- < Toaster position = "bottom-right" />
28
- { env . NEXT_PUBLIC_ANALYTICS_WEBSITE_ID && (
29
- < Script
30
- src = "https://cloud.umami.is/script.js"
31
- data-website-id = { env . NEXT_PUBLIC_ANALYTICS_WEBSITE_ID }
32
- strategy = "lazyOnload"
33
- />
34
- ) }
23
+ < ViewTransition >
24
+ { children }
25
+ < Footer />
26
+ < SessionProvider >
27
+ < ReportModal />
28
+ </ SessionProvider >
29
+ < Toaster position = "bottom-right" />
30
+ { env . NEXT_PUBLIC_ANALYTICS_WEBSITE_ID && (
31
+ < Script
32
+ src = "https://cloud.umami.is/script.js"
33
+ data-website-id = { env . NEXT_PUBLIC_ANALYTICS_WEBSITE_ID }
34
+ strategy = "lazyOnload"
35
+ />
36
+ ) }
37
+ </ ViewTransition >
35
38
</ body >
36
39
</ html >
37
40
) ;
You can’t perform that action at this time.
0 commit comments