handle the doc come from the doc3

This commit is contained in:
momorew
2026-08-25 10:58:29 +05:30
parent 37d23ba4c0
commit e357e02ac2
+8 -1
View File
@@ -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();