diff --git a/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx b/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx index 62a6adf409..6268e5f63e 100644 --- a/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx +++ b/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx @@ -33,10 +33,10 @@ const Popup = () => { const { t } = useTranslation() const { datasetId } = useParams() const { push } = useRouter() - const [published, setPublished] = useState(false) const publishedAt = useStore(s => s.publishedAt) const draftUpdatedAt = useStore(s => s.draftUpdatedAt) const pipelineId = useStore(s => s.pipelineId) + const [published, setPublished] = useState(false) const { formatTimeFromNow } = useFormatTimeFromNow() const { handleCheckBeforePublish } = useChecklistBeforePublish() const { mutateAsync: publishWorkflow } = usePublishWorkflow() @@ -125,7 +125,7 @@ const Popup = () => { className='mb-1 w-full hover:bg-state-accent-hover hover:text-text-accent' variant='tertiary' onClick={goToAddDocuments} - disabled={!published} + disabled={!publishedAt} >
@@ -136,7 +136,7 @@ const Popup = () => {