From 40d817edfb806c72d263b1dd4b2e20b60fa2c11b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Burkard?= <22095555+JeromeBu@users.noreply.github.com> Date: Wed, 11 Dec 2024 09:20:45 +0100 Subject: [PATCH] fix formatting --- .../core/adapters/fetchExternalData.test.ts | 29 +++++++++++-------- .../usecases/userAccountManagement/thunks.ts | 2 -- web/src/stories/getStory.tsx | 1 + web/src/ui/App.tsx | 6 ++-- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/api/src/core/adapters/fetchExternalData.test.ts b/api/src/core/adapters/fetchExternalData.test.ts index 723313de..7ef83882 100644 --- a/api/src/core/adapters/fetchExternalData.test.ts +++ b/api/src/core/adapters/fetchExternalData.test.ts @@ -59,18 +59,18 @@ const acceleroId = 2; const insertAcceleroWithCorrectId = async (db: Kysely, agentId: number) => { await sql` INSERT INTO softwares (id, "softwareType", "externalId", - "externalDataOrigin", "comptoirDuLibreId", - name, description, license, "versionMin", - "isPresentInSupportContract", - "isFromFrenchPublicService", "logoUrl", - keywords, "doRespectRgaa", - "isStillInObservation", - "parentSoftwareWikidataId", - "catalogNumeriqueGouvFrId", - "workshopUrls", "testUrls", categories, - "generalInfoMd", "addedByAgentId", - dereferencing, "referencedSinceTime", - "updateTime") + "externalDataOrigin", "comptoirDuLibreId", + name, description, license, "versionMin", + "isPresentInSupportContract", + "isFromFrenchPublicService", "logoUrl", + keywords, "doRespectRgaa", + "isStillInObservation", + "parentSoftwareWikidataId", + "catalogNumeriqueGouvFrId", + "workshopUrls", "testUrls", categories, + "generalInfoMd", "addedByAgentId", + dereferencing, "referencedSinceTime", + "updateTime") VALUES (${acceleroId}, '{"type": "stack"}', 'Q2822666', 'wikidata', 304, 'Acceleo', 'Outil et/ou plugin de génération de tout ou partie du code', @@ -503,6 +503,11 @@ describe("fetches software extra data (from different providers)", () => { cdlUrl: "https://comptoir-du-libre.org/fr/users/165", website: "https://www.aplose.fr" }, + { + "cdlUrl": "https://comptoir-du-libre.org/fr/users/4129", + "name": "Keenobi", + "website": "https://keenobi.com/" + }, { name: "TEICEE", cdlUrl: "https://comptoir-du-libre.org/fr/users/3838", diff --git a/web/src/core/usecases/userAccountManagement/thunks.ts b/web/src/core/usecases/userAccountManagement/thunks.ts index 5038438b..8f201ad3 100644 --- a/web/src/core/usecases/userAccountManagement/thunks.ts +++ b/web/src/core/usecases/userAccountManagement/thunks.ts @@ -163,7 +163,6 @@ export const thunks = { } { - const { newUrl } = addParamToUrl({ url, "name": "dark", @@ -171,7 +170,6 @@ export const thunks = { }); url = newUrl; - } return url; diff --git a/web/src/stories/getStory.tsx b/web/src/stories/getStory.tsx index 77672162..87688446 100644 --- a/web/src/stories/getStory.tsx +++ b/web/src/stories/getStory.tsx @@ -31,6 +31,7 @@ const { CoreProvider } = createCoreProvider({ "transformUrlBeforeRedirectToLogin": () => { assert(false); }, + "getIsDark": () => false, "getCurrentLang": () => "fr", "onMoved": () => { assert(false); diff --git a/web/src/ui/App.tsx b/web/src/ui/App.tsx index 77936658..fb0ca810 100644 --- a/web/src/ui/App.tsx +++ b/web/src/ui/App.tsx @@ -25,7 +25,6 @@ import { LoadingFallback, loadingFallbackClassName } from "ui/shared/LoadingFall import { useDomRect } from "powerhooks/useDomRect"; import { apiUrl, appUrl, appPath } from "urls"; - const { CoreProvider } = createCoreProvider({ apiUrl, appUrl, @@ -67,9 +66,9 @@ const { CoreProvider } = createCoreProvider({ window.location.href = newUrl.toString(); }, - // NOTE: Passed so that it can be injected in the Account management URL. + // NOTE: Passed so that it can be injected in the Account management URL. // I'm not comfortable with this level of indirection, this is only UI related logic - // that shouldn't involve the core. However I do it this way for consistency sake. + // that shouldn't involve the core. However I do it this way for consistency sake. getIsDark }); @@ -88,7 +87,6 @@ export default function App() { } function ContextualizedApp() { - const route = useRoute(); const { userAuthentication, sillApiVersion } = useCore().functions;