SDK
v2.0
v2.0
  • Getting Started
    • Welcome
    • Start Here
    • Postback Payout (S2S)
    • Advanced options
      • Sending Media Source Data
      • Sending User Segments / User Info
  • Unity
    • Installation
    • Initialization
    • Obtaining Adverstising ID's
  • Android
    • Prerequisite
    • Installation
    • Initialization
      • Deeplinking Routes
      • Premium Offers
    • Obtaining Adverstising ID's
  • Flutter
    • Prerequisite
    • Installation
    • Initialization
      • Deeplinking Routes
      • Premium Offers
      • changeLanguage
    • Obtaining Advertising ID's
  • REACT NATIVE
    • Prerequisites
    • Installation
    • Initialization
      • Deeplinking Routes
      • Premium Offers
    • Obtaining Advertising ID's
  • Web / Iframe
    • Initialization
    • Premium Widgets
  • Questions and troubleshooting
    • Reporting bugs
    • Known issues
    • Changelog
Powered by GitBook
On this page
  • topPremiumOffers
  • Usage
  • Props
  • Example with Customization
  • Notes
  1. REACT NATIVE
  2. Initialization

Premium Offers

topPremiumOffers

The topPremiumOffers component is a part of the Tyrads SDK that provides a UI widget to display premium offers. It allows for extensive customization to control what type of offers are shown and how they are presented.

Usage

import Tyrads from '@tyrads.com/tyrads-sdk';

function OffersScreen() {
  return (
    <SafeAreaView style={{ flex: 1 }}>
      {Tyrads.topPremiumOffers({
        showMore: true,
        showMyOffers: true,
        showMyOffersEmptyView: false,
        viewStyle: 1,
      })}
    </SafeAreaView>
  );
}

Props

showMore

  • Type: boolean

  • Default: true

  • Description: Determines whether the "Show More" option should be displayed to load additional offers.

showMyOffers

  • Type: boolean

  • Default: true

  • Description: Controls the visibility of the "My Offers" section.

showMyOffersEmptyView

  • Type: boolean

  • Default: false

  • Description: If true, an empty view will be displayed if there are no "My Offers" available.

viewStyle

  • Type: number

  • Default: 1

  • Description: Controls the UI style of the offers display. Possible values may vary depending on available layout options in the SDK.

  • Available viewStyleoptions

    • Style 1: Default style.

    • Style 2: Currently used.

    • Style 3: Alternate layout.

    • Style 4: Advanced layout.


Example with Customization

import Tyrads from '@tyrads.com/tyrads-sdk';

function CustomOffersScreen() {
  return (
    <SafeAreaView style={{ flex: 1 }}>
      {Tyrads.topPremiumOffers({
        showMore: false,
        showMyOffers: true,
        showMyOffersEmptyView: true,
        viewStyle: 2,
      })}
    </SafeAreaView>
  );
}

Notes

  • Ensure that Tyrads.init() and Tyrads.loginUser() are called before rendering topPremiumOffers to ensure the necessary data is available.

  • The viewStyle property directly affects the visual presentation; experiment with different values to find the most suitable layout for your app.

PreviousDeeplinking RoutesNextObtaining Advertising ID's

Last updated 2 months ago

Option 1
Option 2
Option 3
Option 4