Skip to content

Commit

Permalink
chore: remove popup
Browse files Browse the repository at this point in the history
  • Loading branch information
iamjoel committed Jun 7, 2024
1 parent cd01ff7 commit 649a63a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 25 deletions.
8 changes: 0 additions & 8 deletions web/app/(commonLayout)/apps/Apps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import SearchInput from '@/app/components/base/search-input'
import { useStore as useTagStore } from '@/app/components/base/tag-management/store'
import TagManagementModal from '@/app/components/base/tag-management'
import TagFilter from '@/app/components/base/tag-management/filter'
import { useModalContext } from '@/context/modal-context'

const getKey = (
pageIndex: number,
Expand All @@ -50,13 +49,6 @@ const getKey = (
}

const Apps = () => {
const { setShowAccountSettingModal } = useModalContext()
useEffect(() => {
setShowAccountSettingModal({
payload: 'data-source',
})
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
const { t } = useTranslation()
const { isCurrentWorkspaceManager } = useAppContext()
const showTagManagementModal = useTagStore(s => s.showTagManagementModal)
Expand Down
36 changes: 19 additions & 17 deletions web/app/components/datasets/create/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,23 +110,25 @@ const DatasetUpdateForm = ({ datasetId }: DatasetUpdateFormProps) => {
<StepsNavBar step={step} datasetId={datasetId} />
</div>
<div className="grow bg-white">
{step === 1 && <StepOne
hasConnection={hasConnection}
onSetting={() => setShowAccountSettingModal({ payload: 'data-source' })}
datasetId={datasetId}
dataSourceType={dataSourceType}
dataSourceTypeDisable={!!detail?.data_source_type}
changeType={setDataSourceType}
files={fileList}
updateFile={updateFile}
updateFileList={updateFileList}
notionPages={notionPages}
updateNotionPages={updateNotionPages}
onStepChange={nextStep}
websitePages={websitePages}
updateWebsitePages={setWebsitePages}
onFireCrawlJobIdChange={setFireCrawlJobId}
/>}
<div className={step === 1 ? 'block h-full' : 'none'}>
<StepOne
hasConnection={hasConnection}
onSetting={() => setShowAccountSettingModal({ payload: 'data-source' })}
datasetId={datasetId}
dataSourceType={dataSourceType}
dataSourceTypeDisable={!!detail?.data_source_type}
changeType={setDataSourceType}
files={fileList}
updateFile={updateFile}
updateFileList={updateFileList}
notionPages={notionPages}
updateNotionPages={updateNotionPages}
onStepChange={nextStep}
websitePages={websitePages}
updateWebsitePages={setWebsitePages}
onFireCrawlJobIdChange={setFireCrawlJobId}
/>
</div>
{(step === 2 && (!datasetId || (datasetId && !!detail))) && <StepTwo
isAPIKeySet={!!embeddingsDefaultModel}
onSetting={() => setShowAccountSettingModal({ payload: 'provider' })}
Expand Down

0 comments on commit 649a63a

Please sign in to comment.