From cc0d57bf2b86c113e881297e95533d44671d9835 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Wed, 24 Jun 2026 20:03:42 +0200 Subject: [PATCH] feat: remove clear Sheets IDs button from creation UI Co-Authored-By: Claude Sonnet 4.6 --- src/app/(dashboard)/creation/page.tsx | 35 +++------------------------ 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/src/app/(dashboard)/creation/page.tsx b/src/app/(dashboard)/creation/page.tsx index 5d5bb9c..5cd78fa 100644 --- a/src/app/(dashboard)/creation/page.tsx +++ b/src/app/(dashboard)/creation/page.tsx @@ -16,8 +16,6 @@ export default function CreationPage() { const [selectedTab, setSelectedTab] = useState(null) const [loading, setLoading] = useState(false) const [error, setError] = useState(null) - const [clearingIds, setClearingIds] = useState(false) - const [clearResult, setClearResult] = useState(null) const [byTab, setByTab] = useState>({}) const [total, setTotal] = useState(0) const [specificColumns, setSpecificColumns] = useState([]) @@ -48,7 +46,6 @@ export default function CreationPage() { setDetectedCollectionId('') setCollectionOverride('') setCollectionSearch('') - setClearResult(null) } const analyse = async () => { @@ -140,23 +137,6 @@ export default function CreationPage() { ] const currentIdx = STEPS.findIndex(s => s.id === step) - const clearSheetIds = async () => { - if (!selectedTab) return - if (!confirm(`Effacer tous les IDs Shopify dans l'onglet "${selectedTab}" ? Les produits Shopify ne seront PAS supprimés.`)) return - setClearingIds(true) - setClearResult(null) - try { - const res = await fetch(`/api/creation/clear-ids?tab=${encodeURIComponent(selectedTab)}`, { method: 'POST' }) - const data = await res.json() - if (!res.ok) throw new Error(data.error) - setClearResult(`✓ ${data.cleared} ID${data.cleared > 1 ? 's' : ''} effacé${data.cleared > 1 ? 's' : ''} dans le Sheets`) - } catch (e) { - setError(e instanceof Error ? e.message : 'Erreur') - } finally { - setClearingIds(false) - } - } - const reset = () => { abortRef.current?.abort() abortRef.current = null @@ -213,17 +193,10 @@ export default function CreationPage() {

Détecte les lignes de {selectedTab}Publié=1 et ID vide.

-
- - -
- {clearResult &&

{clearResult}

} + )}