Skip to content

Commit

Permalink
update + clean
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustinMauroy committed Nov 29, 2024
1 parent 2d90748 commit ccd2cce
Show file tree
Hide file tree
Showing 7 changed files with 296 additions and 1,283 deletions.
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ updates:
patterns:
- 'classnames'
- 'feed'
- 'geist'
- 'rehype-autolink-headings'
- 'rehype-mdx-code-props'
- 'rehype-slug'
Expand Down
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
enable-pre-post-scripts=true
legacy-peer-deps=true
11 changes: 1 addition & 10 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { resolve } from 'node:path';
import type { StorybookConfig } from '@storybook/nextjs';

const config: StorybookConfig = {
Expand Down Expand Up @@ -28,19 +27,11 @@ const config: StorybookConfig = {
previewBody:
'<style>:root { color-scheme: light; } html[data-theme="dark"] { color-scheme: dark; }</style>' +
// Warning: this should be same as the one in `src/styles/globals.css`
'<body class="bg-yellow-50 text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50"></body>',
'<body class="bg-yellow-50 text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50">',
webpack: async config => ({
...config,
// Performance Hints do not make sense on Storybook as it is bloated by design
performance: { hints: false },
// Removes Pesky Critical Dependency Warnings due to `next/font`
ignoreWarnings: [e => e.message.includes('Critical dep')],
// allows to use `~/` as a shortcut to the `src/` folder
resolve: {
...config.resolve,
// @ts-ignore
alias: { ...config.resolve.alias, '~': resolve(__dirname, '../') },
},
}),
};
export default config;
11 changes: 9 additions & 2 deletions app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { getTranslations, setRequestLocale } from 'next-intl/server';
import classNames from 'classnames';
import { GeistSans } from 'geist/font/sans';
import { GeistMono } from 'geist/font/mono';
import { Geist, Geist_Mono } from 'next/font/google';
import { LocaleProvider } from '~/providers/localeProvider.tsx';
import { routing } from '~/lib/i18n/routing';
import type { FC, PropsWithChildren } from 'react';
Expand All @@ -13,6 +12,14 @@ 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: 1 addition & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const nextConfig: NextConfig = {
output: 'export',
images: { unoptimized: true },
trailingSlash: false,
transpilePackages: ['geist', 'next-mdx-remote'],
transpilePackages: ['next-mdx-remote'],
};

export default withNextIntl(nextConfig);
Loading

0 comments on commit ccd2cce

Please sign in to comment.