容器/定制/ ActivitiesScreen.ts

从"recompose"中导入{mapProps, compose};import Activity filter from "../../components/Activity/ActivityFilter";导入withDeeplinkClickHandler from "../../components/hocs/withDeeplinkClickHandler";import withActiveCallBacks from ".. ./navigators/react-navigation-addons/withActiveCallBacks";import {withNavigation} from "react-navigation";从"prop-types"中导入PropTypes;const screenTitle = "activities:headerTitle";const buildFilterProps = props =>({导航:props。导航,屏幕标题,showSearch: true,…道具});const mapPropsHoc = mapProps(buildFilterProps);/** *您可以使用该组件显示活动屏幕在您的自定义屏幕。 * @component * @example  Add image on top of activities screen component  * * //In custom_code/MyCustomScreen.js... * * import React from 'react'; * import { View, Text } from 'react-native'; * import FastImage from "react-native-fast-image"; * * import ActivitiesScreen from "@src/containers/Custom/ActivitiesScreen"; * import {DEVICE_WIDTH} from "@src/styles/global"; * * const MyCustomScreen = (props) => { * * return ( *  * *  * *  * *  * *  *  *  *  * ) * * } * * MyCustomScreen.navigationOptions = { header: null }; * * export default MyCustomScreen; * * * //In custom_code/index.js... * * ... * * import MyCustomScreen from "./components/MyCustomScreen"; * * export const applyCustomCode = externalCodeSetup => { * * externalCodeSetup.navigationApi.addNavigationRoute( * "book", * "BookScreen", * MyCustomScreen, * "All" * ); * externalCodeSetup.navigationApi.addNavigationRoute( * "book", * "BookScreen", * MyCustomScreen, * "Main" * ); * } * */ export const ActivitiesScreen = compose( withDeeplinkClickHandler, mapPropsHoc, withNavigation, withActiveCallBacks )(ActivityFilter); ActivitiesScreen.propTypes = { /** * List screen title. Default comes from translation files in BuddyBoss site */ screenTitle: PropTypes.string, /** * Use `false` to hide search box */ showSearch: PropTypes.bool, /** * Use `true` to hide title of the screen */ hideTitle: PropTypes.bool, /** * Use `true` to hide filters in the screen */ hideFilters: PropTypes.bool, /** * Use `true` to hide the screen title container */ hideNavigationHeader: PropTypes.bool, /** * Define header height */ headerHeight: PropTypes.number }; export default ActivitiesScreen;
Baidu