diff --git a/twake/frontend/src/app/views/applications/drive/context-menu.tsx b/twake/frontend/src/app/views/applications/drive/context-menu.tsx
index ab09dc29a..3a5565fab 100644
--- a/twake/frontend/src/app/views/applications/drive/context-menu.tsx
+++ b/twake/frontend/src/app/views/applications/drive/context-menu.tsx
@@ -80,7 +80,7 @@ export const useOnBuildContextMenu = (children: DriveItem[], initialParentId?: s
text: 'Copy public link',
hide: !item.access_info.public?.level || item.access_info.public?.level === 'none',
onClick: () => {
- copyToClipboard(getPublicLink(item));
+ copyToClipboard(getPublicLink(item || parent?.item));
ToasterService.success('Public link copied to clipboard');
},
},
@@ -244,7 +244,7 @@ export const useOnBuildContextMenu = (children: DriveItem[], initialParentId?: s
!parent?.item?.access_info?.public?.level ||
parent?.item?.access_info?.public?.level === 'none',
onClick: () => {
- copyToClipboard(getPublicLink(item));
+ copyToClipboard(getPublicLink(item || parent?.item));
ToasterService.success('Public link copied to clipboard');
},
},
diff --git a/twake/frontend/src/app/views/applications/drive/index.tsx b/twake/frontend/src/app/views/applications/drive/index.tsx
index 2855146e5..c594930c8 100644
--- a/twake/frontend/src/app/views/applications/drive/index.tsx
+++ b/twake/frontend/src/app/views/applications/drive/index.tsx
@@ -1,6 +1,7 @@
import Browser from './browser';
import { SelectorModal } from './modals/selector';
import TwakeTabConfiguration from './twake-tab-configuration';
+import { useCompanyApplications } from 'app/features/applications/hooks/use-company-applications';
export type EmbedContext = {
companyId?: string;
@@ -18,6 +19,9 @@ export default ({
context?: EmbedContext;
inPublicSharing?: boolean;
}) => {
+ //Preload applications for shared view
+ useCompanyApplications();
+
return (
<>