Skip to content

Commit

Permalink
React 19
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustinMauroy committed Dec 6, 2024
1 parent 36d62a2 commit c8344d2
Show file tree
Hide file tree
Showing 6 changed files with 244 additions and 241 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
enable-pre-post-scripts=true
legacy-peer-deps=true
11 changes: 2 additions & 9 deletions app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { getTranslations, setRequestLocale } from 'next-intl/server';
import classNames from 'classnames';
import { Geist, Geist_Mono } from 'next/font/google';
import { GeistSans } from 'geist/font/sans';
import { GeistMono } from 'geist/font/mono';
import { LocaleProvider } from '~/providers/localeProvider.tsx';
import { routing } from '~/lib/i18n/routing';
import type { FC, PropsWithChildren } from 'react';
Expand All @@ -12,14 +13,6 @@ type RootLayoutProps = PropsWithChildren<BaseParams>;

export const dynamic = 'force-static';

const GeistSans = Geist({
subsets: ['latin'],
});

const GeistMono = Geist_Mono({
subsets: ['latin'],
});

// Generate params for all available locales
// It's allow us to build the website statically for all locales
export const generateStaticParams = () =>
Expand Down
2 changes: 2 additions & 0 deletions components/Common/Codebox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ type CodeboxProps = {
const Codebox: FC<CodeboxProps> = async props => {
if (!isValidElement(props.children)) return null;

// @ts-ignore
const code = props.children.props.children.trim();
// @ts-ignore
const lang = props.children.props.className
.replace('language-', '')
.replace('mjs', 'js');
Expand Down
3 changes: 2 additions & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ const nextConfig: NextConfig = {
typescript: {
ignoreBuildErrors: true,
},
// We didn't use eslint
eslint: {
ignoreDuringBuilds: true,
},
// Static website output
output: 'export',
images: { unoptimized: true },
trailingSlash: false,
transpilePackages: ['next-mdx-remote'],
transpilePackages: ['geist', 'next-mdx-remote'],
};

export default withNextIntl(nextConfig);
Loading

0 comments on commit c8344d2

Please sign in to comment.