-
-
Notifications
You must be signed in to change notification settings - Fork 12
Root: ui|v2.5|src|components|FrontPage: Control.tsx
Serechops edited this page Apr 9, 2024
·
1 revision
This file contains components related to controlling and displaying filter results.
-
mode
: Filter mode. -
filter
: List filter model. -
header
: Header string for the recommendation row.
- This component renders different types of recommendation rows based on the provided filter mode.
- It dynamically selects the appropriate recommendation row component based on the filter mode and passes the necessary props to it.
-
savedFilterID
: ID of the saved filter.
- This component fetches a saved filter by ID and renders the corresponding recommendation row.
- It uses the
useFindSavedFilter
hook to fetch the saved filter data and then creates aListFilterModel
based on the fetched data. - The
RecommendationRow
component is used to render the recommendation row with the fetched filter.
-
customFilter
: Custom filter object.
- This component renders a recommendation row for a custom filter.
- It creates a
ListFilterModel
based on the provided custom filter data and uses theRecommendationRow
component to render the recommendation row.
-
content
: FrontPageContent object.
- This component acts as a controller for rendering recommendation rows based on the content type.
- It switches between rendering saved filter results and custom filter results based on the type of
FrontPageContent
. - For saved filter content, it renders the
SavedFilterResults
component. - For custom filter content, it renders the
CustomFilterResults
component.
<Control content={content} />
In this example, content represents the FrontPageContent object, which can be either a saved filter or a custom filter.