Components

GroupActivitiesScreen

<GroupActivitiesScreen />

Constructor

# <GroupActivitiesScreen />

You can use this component to display Groups Activities Screen in your custom screen.

Properties:
Name Type Attributes Description
groupId Number <optional>

Id of group to display

searchTerm String <optional>

If the group is not yet available in the app state, the component will attempt to load a list of groups. You can use this field to search for the specific group you want to load instead of loading a list of groups.

headerHeight Number <optional>

Define header height

hideBackButton Boolean <optional>

Use true to hide the back button

hideNavigationHeader Boolean <optional>

Use true to hide the screen title container when scrolling

hideNewActivityButton Boolean <optional>

Use true to hide the new activity button

screenTitle String <optional>

List screen title

showSearch Boolean <optional>

Use false to hide search box

LoadingComponent ReactComponent <optional>

Use this to display your own loading component while the screen is loading

Example
//In custom_code/components/MyCustomScreen.js...

import React from 'react';
import { View, Text } from 'react-native';
import GroupActivitiesScreen from "@src/containers/Custom/Group/GroupActivitiesScreen";
import { useSelector } from 'react-redux';
const MyCustomScreen = (props) => {

   const groupId = 9;
   const group = useSelector(state => state.groupsCache.byId.get(groupId.toString()));
   return <>
       <View style={{ marginTop: 40, padding: 10 }}>
           <Text>You are the {group?.role} of {group?.name} group</Text>
       </View>
       <GroupActivitiesScreen {...props}
           groupId={groupId}
           showSearch={true}
           headerHeight={0}
           hideBackButton={true}
           // hideNavigationHeader={true}
           // hideNewActivityButton={true}
           // screenTitle="Hello World"
           LoadingComponent={<View style={{ flex: 1, alignSelf: "center", justifyContent: "center" }}>
               <Text>Loading, please wait...</Text>
           </View>
           } />
   </>

}


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"
 );
}