Components

NotificationsScreen

<NotificationsScreen />

Constructor

# <NotificationsScreen />

You can use this component to display your Notifications screen in your custom screen.

Properties:
Name Type Attributes Description
screenTitle String <optional>

List screen title. Default comes from translation files in BuddyBoss site

contentInsetTop Number <optional>

The amount by which the scroll view content is inset from the edges of the scroll view.

contentOffsetY Number <optional>

Used to manually set the starting scroll offset.

notificationFilters Array <optional>

Use unread or read and assign it in an array to assign filters

selectedFilter String <optional>

Use unread or read to initialize selected filter

hideNavigationHeader Boolean <optional>

Use true to hide the screen title container

hideScrollHeader Boolean <optional>

Use true to hide the scroll header

Example

Show read notifications only

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

import React from 'react';
import NotificationsScreen from "@src/containers/Custom/NotificationsScreen";

const filters = ["read"]

const MyCustomScreen = (props) => (
 <NotificationsScreen {...props} screenTitle="My Notifications" selectedFilter="read" notificationFilters={filters}/>
)


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