Skip to content

Commit

Permalink
Adds Nextjs Loader (#909)
Browse files Browse the repository at this point in the history
* feat: adds nextjs loader to swc

* feat: requested change
  • Loading branch information
Paulo Victor authored May 27, 2024
1 parent 6cf8631 commit 54d3250
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
17 changes: 7 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"next-i18n-router": "^5.0.2",
"next-sitemap": "^4.2.3",
"next-themes": "^0.2.1",
"nextjs-toploader": "^1.6.6",
"nextjs-toploader": "^1.6.12",
"obscenity": "^0.2.0",
"p-limit": "^5.0.0",
"p-retry": "^6.2.0",
Expand Down
8 changes: 6 additions & 2 deletions src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { SpeedInsights } from '@vercel/speed-insights/next'
import { capitalize } from 'lodash-es'
import type { Metadata, Viewport } from 'next'
import { notFound } from 'next/navigation'
import NextTopLoader from 'nextjs-toploader'

import { TopLevelClientLogic } from '@/app/[locale]/topLevelClientLogic'
import { CookieConsent } from '@/components/app/cookieConsent'
Expand Down Expand Up @@ -71,8 +72,11 @@ export default function Layout({ children, params }: PageProps & { children: Rea
<html lang={locale}>
<body className={fontClassName}>
<OverrideGlobalLocalStorage />
{/* LATER-TASK add back once https://github.com/TheSGJ/nextjs-toploader/issues/66 is resolved */}
{/* <NextTopLoader /> */}
<NextTopLoader
color="hsl(var(--primary-cta))"
shadow="0 0 10px hsl(var(--primary-cta)),0 0 5px hsl(var(--primary-cta))"
showSpinner={false}
/>
<TopLevelClientLogic locale={locale}>
<FullHeight.Container>
<Navbar locale={locale} />
Expand Down

0 comments on commit 54d3250

Please sign in to comment.