From 9fe6eb569a5483b054795edb91c162b53e4b8762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Burkard?= <22095555+JeromeBu@users.noreply.github.com> Date: Fri, 26 Jul 2024 10:59:35 +0200 Subject: [PATCH] remove possiblity to link instance to wikidata softwares --- .gitignore | 3 +- web/src/ui/pages/instanceForm/Step1.tsx | 56 ++++--------------------- 2 files changed, 9 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index d772a946..8afc089e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules .turbo .env -deploy_sill.js \ No newline at end of file +deploy_sill.js +docker-data diff --git a/web/src/ui/pages/instanceForm/Step1.tsx b/web/src/ui/pages/instanceForm/Step1.tsx index 11927026..c943e60a 100644 --- a/web/src/ui/pages/instanceForm/Step1.tsx +++ b/web/src/ui/pages/instanceForm/Step1.tsx @@ -1,15 +1,14 @@ -import { useState } from "react"; -import { useForm, Controller } from "react-hook-form"; +import { fr } from "@codegouvfr/react-dsfr"; +import type { useCore } from "core"; +import type { WikidataEntry } from "core/usecases/instanceForm"; import type { NonPostableEvt } from "evt"; import { useEvt } from "evt/hooks"; +import { declareComponentKeys } from "i18nifty"; +import { useState } from "react"; +import { Controller, useForm } from "react-hook-form"; import { assert } from "tsafe/assert"; -import type { WikidataEntry } from "core/usecases/instanceForm"; +import { useResolveLocalizedString, useTranslation } from "ui/i18n"; import { AutocompleteInput } from "ui/shared/AutocompleteInput"; -import { SearchMultiInput } from "ui/shared/SearchMultiInput"; -import type { useCore } from "core"; -import { fr } from "@codegouvfr/react-dsfr"; -import { declareComponentKeys } from "i18nifty"; -import { useTranslation, useResolveLocalizedString } from "ui/i18n"; export type Step1Props = { className?: string; @@ -144,47 +143,6 @@ export function InstanceFormStep1(props: Step1Props) { )} /> - ( - field.onChange(value)} - getOptionLabel={wikidataEntry => - resolveLocalizedString(wikidataEntry.label) - } - renderOption={(liProps, wikidataEntity) => ( -
  • -
    - - {resolveLocalizedString(wikidataEntity.label)} - -
    - - {resolveLocalizedString( - wikidataEntity.description - )} - -
    -
  • - )} - noOptionText={tCommon("no result")} - loadingText={tCommon("loading")} - dsfrInputProps={{ - "label": t("other software"), - "nativeInputProps": { - "ref": field.ref, - "onBlur": field.onBlur, - "name": field.name - } - }} - /> - )} - /> -