Skip to content

Commit

Permalink
Checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed Dec 29, 2022
1 parent e7b0e90 commit d444b45
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 40 deletions.
9 changes: 8 additions & 1 deletion searchlib/components/SearchView/SearchView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -77,6 +83,7 @@ export const SearchView = (props) => {
}
mode={mode}
/>
{belowSearchInput}
</>
}
sideContent={null}
Expand Down
6 changes: 4 additions & 2 deletions src/SearchBlock/BlockContainer/BlockContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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={() => {}}
Expand Down
41 changes: 4 additions & 37 deletions src/SearchBlock/templates/FullView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,6 @@ const slots = [
'belowResults',
];

// aboveSearchInput={
// <BlockContainer
// block="aboveSearchInput"
// data={slotFills?.['aboveSearchInput']}
// mode={mode}
// onChangeSlotfill={onChangeSlotfill}
// onDeleteSlotfill={onDeleteSlotfill}
// />
// }
// belowSearchInput={
// <BlockContainer
// block="belowSearchInput"
// data={slotFills?.['belowSearchInput']}
// mode={mode}
// onChangeSlotfill={onChangeSlotfill}
// onDeleteSlotfill={onDeleteSlotfill}
// />
// }
// aboveResults={
// <BlockContainer
// block="aboveResults"
// data={slotFills?.['aboveResults']}
// mode={mode}
// onChangeSlotfill={onChangeSlotfill}
// onDeleteSlotfill={onDeleteSlotfill}
// />
// }
// belowResults={
// <BlockContainer
// block="belowResults"
// data={slotFills?.['belowResults']}
// mode={mode}
// onChangeSlotfill={onChangeSlotfill}
// onDeleteSlotfill={onDeleteSlotfill}
// />
// }

function FullView(props) {
const {
appName,
Expand All @@ -63,6 +26,8 @@ function FullView(props) {
onDeleteSlotfill,
onSelectSlotfill,
selectedSlotFill,
properties,
metadata,
} = props;

// TODO: (about bodyclass) this is a hack, please solve it properly
Expand Down Expand Up @@ -94,6 +59,8 @@ function FullView(props) {
onDeleteSlotfill={onDeleteSlotfill}
onSelectSlotfill={onSelectSlotfill}
selected={selectedSlotFill === name}
properties={properties}
metadata={metadata}
/>
),
})),
Expand Down

0 comments on commit d444b45

Please sign in to comment.