From 25ffdb8123cbbc974e1579af3156c88378e43694 Mon Sep 17 00:00:00 2001 From: Whitigol <36452182+WhitigolProd@users.noreply.github.com> Date: Tue, 14 May 2024 19:22:27 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20chore:=20remove=20deprecated=20"?= =?UTF-8?q?images.domains"=20(#1929)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Bug - [ ] Related issues linked using `closes: #number` ## Feature - [ ] Related issues linked using `closes: #number` - [ ] There is only 1 db migration with no breaking changes. ## Translations - [ ] `.json` files are formatted: `pnpm format` - [ ] Translations are correct - [ ] New translation? It's been added to `i18n.config.mjs` --- apps/client/next.config.mjs | 18 +++++++++++++++++- apps/client/tests/utils.test.ts | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/apps/client/next.config.mjs b/apps/client/next.config.mjs index 050188e77..fda569bc2 100644 --- a/apps/client/next.config.mjs +++ b/apps/client/next.config.mjs @@ -24,7 +24,23 @@ const nextConfig = { // prettier-ignore images: { // start images formats: ["image/avif", "image/webp"], - domains: ["i.imgur.com", "cdn.discordapp.com", "localhost"] + remotePatterns: [ + { + protocol: "https", + hostname: "i.imgur.com", + pathname: "**" + }, + { + protocol: "https", + hostname: "cdn.discordapp.com", + pathname: "**" + }, + { + protocol: "http", + hostname: "localhost", + pathname: "**" + }, + ] }, // end images // prettier-enable webpack(config, { webpack }) { diff --git a/apps/client/tests/utils.test.ts b/apps/client/tests/utils.test.ts index 538649ecf..f0ce8d452 100644 --- a/apps/client/tests/utils.test.ts +++ b/apps/client/tests/utils.test.ts @@ -25,7 +25,7 @@ const DOB_2 = "1953-10-21"; describe("calculateAge", () => { test("Should correctly calculate age", () => { - expect(calculateAge(DOB_1)).toMatchInlineSnapshot('"24"'); + expect(calculateAge(DOB_1)).toMatchInlineSnapshot('"25"'); }); test("Should correctly calculate age", () => {