From 73c7798eb5863086f9165823750cebf0304ff635 Mon Sep 17 00:00:00 2001 From: Laercio Rios Date: Mon, 9 Sep 2024 21:22:32 -0300 Subject: [PATCH] feat: create projects page --- next.config.mjs | 22 +++++++++--- src/app/assets/icons/arrow-left.svg | 9 ++--- src/app/components/Header/index.tsx | 4 ++- src/app/components/Header/styles.module.css | 4 +++ src/app/i18n/locales/en.json | 37 ++++++++++++++++++++- src/app/projects/page.module.css | 7 ++++ src/app/projects/page.tsx | 14 ++++++++ 7 files changed, 83 insertions(+), 14 deletions(-) create mode 100644 src/app/projects/page.module.css create mode 100644 src/app/projects/page.tsx diff --git a/next.config.mjs b/next.config.mjs index 86b71b1..833a6ca 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,11 +1,23 @@ /** @type {import('next').NextConfig} */ const nextConfig = { webpack(config) { - config.module.rules.push({ - test: /\.svg$/i, - issuer: /\.[jt]sx?$/, - use: ["@svgr/webpack"], - }); + const fileLoaderRule = config.module.rules.find((rule) => + rule.test?.test?.(".svg"), + ); + + config.module.rules.push( + { + ...fileLoaderRule, + test: /\.svg$/i, + resourceQuery: /url/, // *.svg?url + }, + { + test: /\.svg$/i, + issuer: fileLoaderRule.issuer, + resourceQuery: { not: [...fileLoaderRule.resourceQuery.not, /url/] }, + use: ["@svgr/webpack"], + }, + ); return config; }, diff --git a/src/app/assets/icons/arrow-left.svg b/src/app/assets/icons/arrow-left.svg index 3caba6e..cb0437d 100644 --- a/src/app/assets/icons/arrow-left.svg +++ b/src/app/assets/icons/arrow-left.svg @@ -1,8 +1,3 @@ - - - - - - - \ No newline at end of file + + diff --git a/src/app/components/Header/index.tsx b/src/app/components/Header/index.tsx index cdf7af3..f9ba8a2 100644 --- a/src/app/components/Header/index.tsx +++ b/src/app/components/Header/index.tsx @@ -15,7 +15,9 @@ interface HeaderProps { export default function Header({ hasBackButton }: HeaderProps) { return ( -