From d444b450d74cf92bed86d86d6e6a1b5ad955d632 Mon Sep 17 00:00:00 2001 From: Tiberiu Ichim Date: Thu, 29 Dec 2022 18:28:34 +0200 Subject: [PATCH] Checkpoint --- .../components/SearchView/SearchView.jsx | 9 +++- .../BlockContainer/BlockContainer.jsx | 6 ++- src/SearchBlock/templates/FullView.jsx | 41 ++----------------- 3 files changed, 16 insertions(+), 40 deletions(-) diff --git a/searchlib/components/SearchView/SearchView.jsx b/searchlib/components/SearchView/SearchView.jsx index b1f1ebf4f..110db9eaf 100644 --- a/searchlib/components/SearchView/SearchView.jsx +++ b/searchlib/components/SearchView/SearchView.jsx @@ -20,7 +20,13 @@ import { useAtom } from 'jotai'; import { isLandingPageAtom } from './state'; export const SearchView = (props) => { - const { appConfig, appName, mode = 'view', aboveSearchInput } = props; + const { + appConfig, + appName, + mode = 'view', + aboveSearchInput, + belowSearchInput, + } = props; const searchContext = useSearchContext(); const { driver } = React.useContext(SUISearchContext); @@ -77,6 +83,7 @@ export const SearchView = (props) => { } mode={mode} /> + {belowSearchInput} } sideContent={null} diff --git a/src/SearchBlock/BlockContainer/BlockContainer.jsx b/src/SearchBlock/BlockContainer/BlockContainer.jsx index 4ab0aa6d8..22d959cab 100644 --- a/src/SearchBlock/BlockContainer/BlockContainer.jsx +++ b/src/SearchBlock/BlockContainer/BlockContainer.jsx @@ -24,13 +24,14 @@ export default function BlockContainer(props) { onChangeSlotfill, onDeleteSlotfill, onSelectSlotfill, + properties, + metadata, } = props; const location = useLocation(); const content = { blocks: { [block]: data }, blocks_layout: { items: [block] }, }; - const metadata = {}; const index = 0; const blocksConfig = React.useMemo( @@ -66,7 +67,8 @@ export default function BlockContainer(props) { block={block} data={data} type={data['@type']} - properties={metadata} + properties={properties} + metadata={metadata} selected={selected} multiSelected={false} onMoveBlock={() => {}} diff --git a/src/SearchBlock/templates/FullView.jsx b/src/SearchBlock/templates/FullView.jsx index 510d985dd..5515239f9 100644 --- a/src/SearchBlock/templates/FullView.jsx +++ b/src/SearchBlock/templates/FullView.jsx @@ -17,43 +17,6 @@ const slots = [ 'belowResults', ]; -// aboveSearchInput={ -// -// } -// belowSearchInput={ -// -// } -// aboveResults={ -// -// } -// belowResults={ -// -// } - function FullView(props) { const { appName, @@ -63,6 +26,8 @@ function FullView(props) { onDeleteSlotfill, onSelectSlotfill, selectedSlotFill, + properties, + metadata, } = props; // TODO: (about bodyclass) this is a hack, please solve it properly @@ -94,6 +59,8 @@ function FullView(props) { onDeleteSlotfill={onDeleteSlotfill} onSelectSlotfill={onSelectSlotfill} selected={selectedSlotFill === name} + properties={properties} + metadata={metadata} /> ), })),