From 116cce0262f331eedc95930d56c2ec9e570f68ab Mon Sep 17 00:00:00 2001 From: vargajoe Date: Mon, 9 Oct 2023 16:33:14 +0200 Subject: [PATCH] finding the spot --- apps/sensenet/src/components/content/Explore.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/sensenet/src/components/content/Explore.tsx b/apps/sensenet/src/components/content/Explore.tsx index da596f37b..5ec9498b9 100644 --- a/apps/sensenet/src/components/content/Explore.tsx +++ b/apps/sensenet/src/components/content/Explore.tsx @@ -95,7 +95,7 @@ export function Explore({ const contentTypeName = useQuery().get('content-type') const pathFromUrl = useQuery().get('path') const snRoute = useSnRoute() - const activeAction = snRoute.match!.params.action + let activeAction = snRoute.match!.params.action const onActivateItemOverride = async (activeItem: GenericContent) => { const expandedItem = await repository.load({ @@ -113,6 +113,11 @@ export function Explore({ const onTreeLoadingChange = useCallback((isLoading) => setIsTreeLoading(isLoading), []) + console.log('!!!', snRoute, activeContent) + if (activeContent.endsWith('png') || activeContent.endsWith('jpg') || activeContent.endsWith('jpeg')) { + activeAction = 'image' + } + const renderContent = () => { switch (activeAction) { case 'browse': @@ -152,6 +157,8 @@ export function Explore({ return case 'setpermissions': return + case 'image': + return case 'preview': return case 'edit-binary':