handle the doc come from the doc3
This commit is contained in:
@@ -422,7 +422,12 @@ function App() {
|
||||
const token = params.get('token');
|
||||
const resourceId = params.get('resource_id');
|
||||
|
||||
if (streamUrl && uploadUrl && token && !hasImportedRemoteRef.current) {
|
||||
const isRemoteContext = Boolean(streamUrl && uploadUrl && token);
|
||||
if (isRemoteContext) {
|
||||
if (hasImportedRemoteRef.current) {
|
||||
setIsLoading(false);
|
||||
return;
|
||||
}
|
||||
hasImportedRemoteRef.current = true;
|
||||
try {
|
||||
const gatewayUrl = import.meta.env.VITE_GATEWAY_URL || '';
|
||||
@@ -448,6 +453,8 @@ function App() {
|
||||
console.error('Remote import failed:', err);
|
||||
setImportError('Failed to open the remote document.');
|
||||
}
|
||||
setIsLoading(false);
|
||||
return;
|
||||
}
|
||||
|
||||
const docs = await gatewayService.listDocuments();
|
||||
|
||||
Reference in New Issue
Block a user