Skip to main content

Loyalty Program

The Loyalty Program component renders the loyalty program card.
It is composed of a main section containing the program information, a section showing the points achieved by the user and a "discover more" button that once clicked opens a modal containing the available prizes that can be request.

Usage

 import React from 'react';
import {SCContextProvider} from '@selfcommunity/react-core';
import {LoyaltyProgramWidget} from '@selfcommunity/react-ui';

function App() {
const conf = {
portal: '<community-path>',
session: {
type: 'OAuth',
token: '<community-token>',
refreshToken: '<community-refresh-token>',
refreshTokenEndpoint: '<community-refresh-endpoint>',
},
};
return (
<SCContextProvider conf={conf}><LoyaltyProgramWidget /></SCContextProvider>
);
}