Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
b668d06c
Commit
b668d06c
authored
Jun 16, 2023
by
StyleZhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: no data source bounding
parent
03c69fed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
base.tsx
web/app/components/base/notion-page-selector/base.tsx
+5
-5
No files found.
web/app/components/base/notion-page-selector/base.tsx
View file @
b668d06c
...
@@ -29,7 +29,7 @@ const NotionPageSelector = ({
...
@@ -29,7 +29,7 @@ const NotionPageSelector = ({
onPreview
,
onPreview
,
datasetId
=
''
,
datasetId
=
''
,
}:
NotionPageSelectorProps
)
=>
{
}:
NotionPageSelectorProps
)
=>
{
const
{
data
,
error
,
mutate
}
=
useSWR
({
url
:
'/notion/pre-import/pages'
,
datasetId
},
preImportNotionPages
)
const
{
data
,
mutate
}
=
useSWR
({
url
:
'/notion/pre-import/pages'
,
datasetId
},
preImportNotionPages
)
const
[
prevData
,
setPrevData
]
=
useState
(
data
)
const
[
prevData
,
setPrevData
]
=
useState
(
data
)
const
[
searchValue
,
setSearchValue
]
=
useState
(
''
)
const
[
searchValue
,
setSearchValue
]
=
useState
(
''
)
const
[
showDataSourceSetting
,
setShowDataSourceSetting
]
=
useState
(
false
)
const
[
showDataSourceSetting
,
setShowDataSourceSetting
]
=
useState
(
false
)
...
@@ -88,11 +88,8 @@ const NotionPageSelector = ({
...
@@ -88,11 +88,8 @@ const NotionPageSelector = ({
return
(
return
(
<
div
className=
'bg-gray-25 border border-gray-200 rounded-xl'
>
<
div
className=
'bg-gray-25 border border-gray-200 rounded-xl'
>
{
{
error
?.
status
===
404
data
?.
notion_info
?.
length
?
(
?
(
<
NotionConnector
onSetting=
{
()
=>
setShowDataSourceSetting
(
true
)
}
/>
)
:
(
<>
<>
<
div
className=
'flex items-center pl-[10px] pr-2 h-11 bg-white border-b border-b-gray-200 rounded-t-xl'
>
<
div
className=
'flex items-center pl-[10px] pr-2 h-11 bg-white border-b border-b-gray-200 rounded-t-xl'
>
<
WorkspaceSelector
<
WorkspaceSelector
...
@@ -125,6 +122,9 @@ const NotionPageSelector = ({
...
@@ -125,6 +122,9 @@ const NotionPageSelector = ({
</
div
>
</
div
>
</>
</>
)
)
:
(
<
NotionConnector
onSetting=
{
()
=>
setShowDataSourceSetting
(
true
)
}
/>
)
}
}
{
{
showDataSourceSetting
&&
(
showDataSourceSetting
&&
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment