Skip to content

Commit

Permalink
Merge pull request #12 from RaphaelEscrig/feat/layout
Browse files Browse the repository at this point in the history
Add layout with header
  • Loading branch information
RaphaelEscrig authored Aug 8, 2024
2 parents 8ae5c0b + 8d64c2f commit c99bb2a
Show file tree
Hide file tree
Showing 12 changed files with 1,861 additions and 123 deletions.
10 changes: 8 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
"posthog",
"POSTHOG",
"psql",
"PSQL"
"PSQL",
"svgr"
],
"i18n-ally.sourceLanguage": "fr",
"i18n-ally.displayLanguage": "fr",
"i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": [
"src/app/locales",
"src/modules/cities/core/locales",
"src/modules/shared/core/locales",
"src/modules/specialties/core/locales"
"src/modules/specialties/core/locales",
"src/modules/layout/core/locales"
]
}
26 changes: 26 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,32 @@ const withNextIntl = createNextIntlPlugin("./src/app/locales/i18n.ts");

/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config) {
const fileLoaderRule = config.module.rules.find((rule) =>
rule.test?.test?.(".svg")
);

config.module.rules.push(
// Reapply the existing rule, but only for svg imports ending in ?url
{
...fileLoaderRule,
test: /\.svg$/i,
resourceQuery: /url/, // *.svg?url
},
// Convert all other *.svg imports to React components
{
test: /\.svg$/i,
issuer: fileLoaderRule.issuer,
resourceQuery: { not: [...fileLoaderRule.resourceQuery.not, /url/] }, // exclude if *.svg?url
use: ["@svgr/webpack"],
}
);

// Modify the file loader rule to ignore *.svg, since we have it handled now.
fileLoaderRule.exclude = /\.svg$/i;

return config;
},
async redirects() {
return [
{
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"zod": "^3.23.8"
},
"devDependencies": {
"@svgr/webpack": "^8.1.0",
"@types/jest": "^29.5.12",
"@types/node": "^20",
"@types/react": "^18",
Expand Down
Loading

0 comments on commit c99bb2a

Please sign in to comment.