-
-
Notifications
You must be signed in to change notification settings - Fork 12
Root: ui|v2.5|src|components|Performers: PerformerList.tsx
Serechops edited this page Apr 10, 2024
·
1 revision
This file contains a React functional component PerformerList
used to display a list of performers with various functionalities. Here's an overview of its structure and functionalities:
-
Imports: The file imports necessary modules and components from lodash, React, React Router, and custom components.
-
Helper Functions:
-
FormatHeight
: Formats the height of a performer, converting it from centimeters to both metric and imperial units. -
FormatAge
: Formats the age of a performer based on their birthdate and optionally death date. -
FormatWeight
: Formats the weight of a performer, converting it from kilograms to both metric and imperial units. -
FormatCircumcised
: Formats the circumcision status of a performer. -
FormatPenisLength
: Formats the length of a performer's penis, converting it from centimeters to both metric and imperial units.
-
-
Component Props:
-
filterHook
: A function to customize the filter applied to the list of performers. -
persistState
: A parameter to determine the persistence level of the filter state. -
alterQuery
: A boolean indicating whether to alter the query. -
extraCriteria
: Extra criteria for filtering performer information.
-
-
Rendering:
- The component renders an
PerformerItemList
component which handles the fetching and rendering of the list of performers based on the provided filter criteria. - It also renders dialogs for editing and deleting performers.
- The component renders an
-
Functions:
-
openRandom
: Opens a random performer's page. -
onExport
: Opens the export dialog for selected performers. -
onExportAll
: Opens the export dialog for all performers. -
renderContent
: Renders the list of performers based on the selected display mode (Grid, List, Tagger). -
renderEditDialog
: Renders the dialog for editing performers. -
renderDeleteDialog
: Renders the dialog for deleting performers.
-
import PerformerList from "./PerformerList";
// Inside a React component
<PerformerList />;
This will render a list of performers with various functions.